diff options
| author | polo <ordipolo@gmx.fr> | 2025-09-01 18:52:17 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-09-01 18:52:17 +0200 |
| commit | f477314613beb26b0ce4c61ec0b1900df1de1cb1 (patch) | |
| tree | d41ace78a572a11887e7cfa2611c3f02fb04e51c /src/controller/Director.php | |
| parent | e642cd51d7e8599537f8514bef8d5d16096dddf8 (diff) | |
| download | cms-f477314613beb26b0ce4c61ec0b1900df1de1cb1.tar.gz cms-f477314613beb26b0ce4c61ec0b1900df1de1cb1.tar.bz2 cms-f477314613beb26b0ce4c61ec0b1900df1de1cb1.zip | |
renommage des présentations,modif présentation des blocs et largeur min (donc nb de colonnes) en mode grid, corrections de bugs et erreurs 404, le param page_modif n'est plus une action, légère symfonyfication du routeur
Diffstat (limited to 'src/controller/Director.php')
| -rw-r--r-- | src/controller/Director.php | 11 |
1 files changed, 7 insertions, 4 deletions
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 | |||
| 13 | static public Menu $menu_data; // pour NavBuilder | 13 | static public Menu $menu_data; // pour NavBuilder |
| 14 | static public ?Path $page_path = null; // pour $current dans NavBuilder et pour BreadcrumbBuilder | 14 | static public ?Path $page_path = null; // pour $current dans NavBuilder et pour BreadcrumbBuilder |
| 15 | private Page $page; | 15 | private Page $page; |
| 16 | private Node $node; | 16 | private ?Node $node; |
| 17 | private Node $article; | 17 | private Node $article; |
| 18 | 18 | ||
| 19 | public function __construct(EntityManager $entityManager, bool $get_menu = false) | 19 | public function __construct(EntityManager $entityManager, bool $get_menu = false) |
| @@ -82,8 +82,10 @@ class Director | |||
| 82 | $node->getParent()->addChild($node); | 82 | $node->getParent()->addChild($node); |
| 83 | 83 | ||
| 84 | // spécifique page article | 84 | // spécifique page article |
| 85 | if($node->getName() === 'new' && $this->page->getEndOfPath() == 'article'){ | 85 | if($this->page->getEndOfPath() == 'article'){ |
| 86 | $new = $node; | 86 | if($node->getName() === 'new'){ |
| 87 | $new = $node; | ||
| 88 | } | ||
| 87 | } | 89 | } |
| 88 | } | 90 | } |
| 89 | } | 91 | } |
| @@ -93,9 +95,10 @@ class Director | |||
| 93 | } | 95 | } |
| 94 | 96 | ||
| 95 | // le basique | 97 | // le basique |
| 96 | public function findNodeById(int $id): void | 98 | public function findNodeById(int $id): bool |
| 97 | { | 99 | { |
| 98 | $this->node = $this->entityManager->find('App\Entity\Node', $id); | 100 | $this->node = $this->entityManager->find('App\Entity\Node', $id); |
| 101 | return $this->node === null ? false : true; | ||
| 99 | } | 102 | } |
| 100 | 103 | ||
| 101 | // récupération d'un article pour modification | 104 | // récupération d'un article pour modification |
