diff options
| author | polo <ordipolo@gmx.fr> | 2025-12-16 22:41:57 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-12-16 22:41:57 +0100 |
| commit | 423755b019a09111b971e36c53e2557e2f5a704f (patch) | |
| tree | 022c0a911133d676dd8e4e90379f8b186863fc88 /src/model/Model.php | |
| parent | 22da81bbcb9bb61fa484c9af6fbb667b685d2f9b (diff) | |
| download | cms-423755b019a09111b971e36c53e2557e2f5a704f.tar.gz cms-423755b019a09111b971e36c53e2557e2f5a704f.tar.bz2 cms-423755b019a09111b971e36c53e2557e2f5a704f.zip | |
page emails, application du RGPD: table email et nettoyeur, renommage de $id_email
Diffstat (limited to 'src/model/Model.php')
| -rw-r--r-- | src/model/Model.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/model/Model.php b/src/model/Model.php index b650183..de391ff 100644 --- a/src/model/Model.php +++ b/src/model/Model.php | |||
| @@ -58,11 +58,16 @@ class Model | |||
| 58 | ->setParameter('page', $this->page) | 58 | ->setParameter('page', $this->page) |
| 59 | ->getResult(); | 59 | ->getResult(); |
| 60 | 60 | ||
| 61 | // groupes d'articles triés par bloc, permet de paginer par bloc | ||
| 62 | foreach($bulk_data as $parent_block){ | 61 | foreach($bulk_data as $parent_block){ |
| 62 | // groupes d'articles triés par bloc, permet de paginer par bloc | ||
| 63 | if(Blocks::hasPresentation($parent_block->getName())){ // = post_block ou news_block | 63 | if(Blocks::hasPresentation($parent_block->getName())){ // = post_block ou news_block |
| 64 | $bulk_data = array_merge($bulk_data, $this->getNextArticles($parent_block, $request)[0]); | 64 | $bulk_data = array_merge($bulk_data, $this->getNextArticles($parent_block, $request)[0]); |
| 65 | } | 65 | } |
| 66 | |||
| 67 | // emails | ||
| 68 | if($parent_block->getName() === 'show_emails'){ | ||
| 69 | $parent_block->getNodeData()->setEmails($this->getAllEmails()); | ||
| 70 | } | ||
| 66 | } | 71 | } |
| 67 | } | 72 | } |
| 68 | else{ // page "article" | 73 | else{ // page "article" |
| @@ -283,4 +288,14 @@ class Model | |||
| 283 | $this->node->addChild($child); | 288 | $this->node->addChild($child); |
| 284 | } | 289 | } |
| 285 | } | 290 | } |
| 291 | |||
| 292 | private function getAllEmails(): array | ||
| 293 | { | ||
| 294 | $dql = 'SELECT e FROM App\Entity\Email e'; | ||
| 295 | return $this->entityManager | ||
| 296 | ->createQuery($dql) | ||
| 297 | //->setParameter('page', $this->page) | ||
| 298 | ->getResult(); | ||
| 299 | } | ||
| 300 | //private function getEmails(string $sender): array | ||
| 286 | } | 301 | } |
