From f477314613beb26b0ce4c61ec0b1900df1de1cb1 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 1 Sep 2025 18:52:17 +0200 Subject: =?UTF-8?q?renommage=20des=20pr=C3=A9sentations,modif=20pr=C3=A9se?= =?UTF-8?q?ntation=20des=20blocs=20et=20largeur=20min=20(donc=20nb=20de=20?= =?UTF-8?q?colonnes)=20en=20mode=20grid,=20corrections=20de=20bugs=20et=20?= =?UTF-8?q?erreurs=20404,=20le=20param=20page=5Fmodif=20n'est=20plus=20une?= =?UTF-8?q?=20action,=20l=C3=A9g=C3=A8re=20symfonyfication=20du=20routeur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/Director.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/controller/Director.php') diff --git a/src/controller/Director.php b/src/controller/Director.php index b154432..6ee0993 100644 --- a/src/controller/Director.php +++ b/src/controller/Director.php @@ -13,7 +13,7 @@ class Director static public Menu $menu_data; // pour NavBuilder static public ?Path $page_path = null; // pour $current dans NavBuilder et pour BreadcrumbBuilder private Page $page; - private Node $node; + private ?Node $node; private Node $article; public function __construct(EntityManager $entityManager, bool $get_menu = false) @@ -82,8 +82,10 @@ class Director $node->getParent()->addChild($node); // spécifique page article - if($node->getName() === 'new' && $this->page->getEndOfPath() == 'article'){ - $new = $node; + if($this->page->getEndOfPath() == 'article'){ + if($node->getName() === 'new'){ + $new = $node; + } } } } @@ -93,9 +95,10 @@ class Director } // le basique - public function findNodeById(int $id): void + public function findNodeById(int $id): bool { $this->node = $this->entityManager->find('App\Entity\Node', $id); + return $this->node === null ? false : true; } // récupération d'un article pour modification -- cgit v1.2.3