diff options
Diffstat (limited to 'src/model/entities/Page.php')
-rw-r--r-- | src/model/entities/Page.php | 14 |
1 files changed, 13 insertions, 1 deletions
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 | |||
34 | #[ORM\Column(type: "boolean")] | 34 | #[ORM\Column(type: "boolean")] |
35 | private bool $in_menu; | 35 | private bool $in_menu; |
36 | 36 | ||
37 | #[ORM\Column(type: "boolean")] | ||
38 | private bool $hidden; | ||
39 | |||
37 | #[ORM\Column(type: "integer", nullable: true)] // null si hors menu | 40 | #[ORM\Column(type: "integer", nullable: true)] // null si hors menu |
38 | private ?int $position; | 41 | private ?int $position; |
39 | 42 | ||
@@ -47,12 +50,13 @@ class Page | |||
47 | /*#[ORM\Column(type: "json", nullable: true)] | 50 | /*#[ORM\Column(type: "json", nullable: true)] |
48 | private ?array $metadata = null;*/ | 51 | private ?array $metadata = null;*/ |
49 | 52 | ||
50 | public function __construct(string $name, string $eop, bool $reachable, bool $in_menu, ?int $position, ?Page $parent) | 53 | public function __construct(string $name, string $eop, bool $reachable, bool $in_menu, bool $hidden, ?int $position, ?Page $parent) |
51 | { | 54 | { |
52 | $this->name_page = $name; | 55 | $this->name_page = $name; |
53 | $this->end_of_path = $eop; | 56 | $this->end_of_path = $eop; |
54 | $this->reachable = $reachable; | 57 | $this->reachable = $reachable; |
55 | $this->in_menu = $in_menu; | 58 | $this->in_menu = $in_menu; |
59 | $this->hidden = $hidden; | ||
56 | $this->position = $position; | 60 | $this->position = $position; |
57 | $this->parent = $parent; | 61 | $this->parent = $parent; |
58 | $this->children = new ArrayCollection(); | 62 | $this->children = new ArrayCollection(); |
@@ -83,6 +87,14 @@ class Page | |||
83 | { | 87 | { |
84 | return $this->in_menu; | 88 | return $this->in_menu; |
85 | } | 89 | } |
90 | public function isHidden(): bool | ||
91 | { | ||
92 | return $this->hidden; | ||
93 | } | ||
94 | public function setHidden(bool $hidden): void | ||
95 | { | ||
96 | $this->hidden = $hidden; | ||
97 | } | ||
86 | public function getPosition(): ?int | 98 | public function getPosition(): ?int |
87 | { | 99 | { |
88 | return $this->position; | 100 | return $this->position; |