aboutsummaryrefslogtreecommitdiff
path: root/src/model/entities
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-06-25 23:17:35 +0200
committerpolo <ordipolo@gmx.fr>2026-06-25 23:41:01 +0200
commit0ee622e0adafad3ee7a5afbcdcc519c7cca544d6 (patch)
tree7e19a8a9569b98948e9b00a2cde68318e5e10652 /src/model/entities
parent63fb854560c2a437ebd72f3ab8b97349fd3eb61d (diff)
downloadcms-0ee622e0adafad3ee7a5afbcdcc519c7cca544d6.tar.gz
cms-0ee622e0adafad3ee7a5afbcdcc519c7cca544d6.tar.bz2
cms-0ee622e0adafad3ee7a5afbcdcc519c7cca544d6.zip
restauration BDD console bin/restore_db.php
Diffstat (limited to 'src/model/entities')
-rw-r--r--src/model/entities/Node.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/model/entities/Node.php b/src/model/entities/Node.php
index c3e4ec3..fb2d867 100644
--- a/src/model/entities/Node.php
+++ b/src/model/entities/Node.php
@@ -98,6 +98,8 @@ class Node
98 { 98 {
99 $this->page = $page; 99 $this->page = $page;
100 }*/ 100 }*/
101
102 // utiliser l'interface de NodeData et EmailForm
101 public function getArticle(): Article 103 public function getArticle(): Article
102 { 104 {
103 return $this->article; 105 return $this->article;
@@ -106,9 +108,13 @@ class Node
106 { 108 {
107 $this->article = $article; 109 $this->article = $article;
108 }*/ 110 }*/
111
109 // une interface serait cool! 112 // une interface serait cool!
113 // OU possible un "héritage doctrine", faire en sorte que Node soit la mère de NodeData, EmailForm, Article...
114 // une seulle instance est matérialisée par plusieurs tables en même temps
110 public function getNodeData(): NodeData|EmailForm|null 115 public function getNodeData(): NodeData|EmailForm|null
111 { 116 {
117 // limite du polymorphisme avec doctrine => impossible d'avoir une unique variable $node_data
112 return $this->name_node === 'form' ? $this->email_form : $this->node_data; 118 return $this->name_node === 'form' ? $this->email_form : $this->node_data;
113 } 119 }
114 public function getChildren(): array 120 public function getChildren(): array