From f27cca08ff786ceff1870147f6d6bad14d71117f Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 23 Oct 2026 00:47:32 +0200 Subject: =?UTF-8?q?dossiers=20avec=20majuscule,=20namespace=20pour=20toute?= =?UTF-8?q?s=20les=20classes,=20autoload=20psr-4,=20UserDataService::creat?= =?UTF-8?q?eZip=20d=C3=A9plac=C3=A9=20dans=20Backup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/MenuBuilder.php | 97 ------------------------------------------------ 1 file changed, 97 deletions(-) delete mode 100644 src/view/MenuBuilder.php (limited to 'src/view/MenuBuilder.php') diff --git a/src/view/MenuBuilder.php b/src/view/MenuBuilder.php deleted file mode 100644 index 0395dfa..0000000 --- a/src/view/MenuBuilder.php +++ /dev/null @@ -1,97 +0,0 @@ -getName() . '.php'; - - if(file_exists($viewFile)) - { - if(IS_ADMIN){ - $this->unfoldMenu(Model::$menu); - - if($template){ - $this->unfoldOptions(Model::$menu); - } - } - else{ - header('Location: ' . new URL); - die; - } - - // si faux, n'utilise pas le template - if($template){ - ob_start(); - require $viewFile; // insertion de $this->html généré par unfoldMenu - $this->html = ob_get_clean(); // pas de concaténation .= cette fois on écrase - } - } - } - - private function unfoldMenu(Page $page): void - { - $this->html .= '
' . "\n"; - - foreach($page->getChildren() as $entry) - { - $checked = $entry->isHidden() ? '' : 'checked'; - $this->html .= '
- - - - - - - '; - - // entrées URL: bouton poubelle + nom du lien + adresse - if(str_starts_with($entry->getEndOfPath(), 'http')){ - $this->html .= '
- - -
- - - - - - - - '; - } - else{ - $this->html .= ' - ' . $entry->getPagePath() . ''; - } - - if(count($entry->getChildren()) > 0){ - $this->unfoldMenu($entry); - } - $this->html .= '
' . "\n"; - } - $this->html .= "
\n"; - } - - private function unfoldOptions(Page $page): void - { - foreach($page->getChildren() as $entry){ - $this->options .= '\n"; - if(count($entry->getChildren()) > 0){ - $this->unfoldOptions($entry); - } - } - } -} \ No newline at end of file -- cgit v1.2.3