summaryrefslogtreecommitdiff
path: root/src/model/entities/Node.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/entities/Node.php')
-rw-r--r--src/model/entities/Node.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/model/entities/Node.php b/src/model/entities/Node.php
index c9b310a..a52a7e6 100644
--- a/src/model/entities/Node.php
+++ b/src/model/entities/Node.php
@@ -52,7 +52,7 @@ class Node
52 // -- fin des attributs destinés à doctrine, début du code utilisateur -- 52 // -- fin des attributs destinés à doctrine, début du code utilisateur --
53 53
54 private array $children = []; // tableau de Node 54 private array $children = []; // tableau de Node
55 private ?self $temp_child = null; // = "new" est l'enfant de "main" lorsque la page est "article" 55 private ?self $adopted = null; // = "new" est un enfant de "main" lorsque la page est "article"
56 56
57 public function __construct(string $name = '', ?string $article_timestamp = null, array $attributes = [], int $position = 0, ?self $parent = null, ?Page $page = null, ?Article $article = null) 57 public function __construct(string $name = '', ?string $article_timestamp = null, array $attributes = [], int $position = 0, ?self $parent = null, ?Page $page = null, ?Article $article = null)
58 { 58 {
@@ -176,12 +176,12 @@ class Node
176 $this->children = array_values($this->children); // réindexer pour supprimer la case vide 176 $this->children = array_values($this->children); // réindexer pour supprimer la case vide
177 } 177 }
178 178
179 public function getTempChild(): ?self // peut renvoyer null 179 public function getAdoptedChild(): ?self // peut renvoyer null
180 { 180 {
181 return $this->temp_child; 181 return $this->adopted;
182 } 182 }
183 public function setTempChild(self $child): void 183 public function setAdoptedChild(self $child): void
184 { 184 {
185 $this->temp_child = $child; 185 $this->adopted = $child;
186 } 186 }
187} 187}