From a3ba7dde60dc1c94b7170ec28266a966e5004d33 Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 22 Apr 2025 00:39:54 +0200 Subject: page menu et chemin, partie 2 --- src/model/entities/Page.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/model/entities') diff --git a/src/model/entities/Page.php b/src/model/entities/Page.php index c30305c..e3e60ca 100644 --- a/src/model/entities/Page.php +++ b/src/model/entities/Page.php @@ -34,6 +34,9 @@ class Page #[ORM\Column(type: "boolean")] private bool $in_menu; + #[ORM\Column(type: "boolean")] + private bool $hidden; + #[ORM\Column(type: "integer", nullable: true)] // null si hors menu private ?int $position; @@ -47,12 +50,13 @@ class Page /*#[ORM\Column(type: "json", nullable: true)] private ?array $metadata = null;*/ - public function __construct(string $name, string $eop, bool $reachable, bool $in_menu, ?int $position, ?Page $parent) + public function __construct(string $name, string $eop, bool $reachable, bool $in_menu, bool $hidden, ?int $position, ?Page $parent) { $this->name_page = $name; $this->end_of_path = $eop; $this->reachable = $reachable; $this->in_menu = $in_menu; + $this->hidden = $hidden; $this->position = $position; $this->parent = $parent; $this->children = new ArrayCollection(); @@ -83,6 +87,14 @@ class Page { return $this->in_menu; } + public function isHidden(): bool + { + return $this->hidden; + } + public function setHidden(bool $hidden): void + { + $this->hidden = $hidden; + } public function getPosition(): ?int { return $this->position; -- cgit v1.2.3