From 09bea09c8157ff45279f0d06aa9d313448c0bec5 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 7 Apr 2025 07:46:27 +0200 Subject: nouvelle "news" --- src/model/Path.php | 6 ------ src/model/entities/Node.php | 10 +++++----- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'src/model') diff --git a/src/model/Path.php b/src/model/Path.php index 6faadfd..11be6fe 100644 --- a/src/model/Path.php +++ b/src/model/Path.php @@ -17,12 +17,6 @@ class Path extends Page $this->findPage(Director::$menu_data, $path_array); // remplit $this->current_page } catch(Exception $e){} - /*echo "nb d'autres pages: " . count(Director::$menu_data->getOtherPages()) . '
'; - echo 'longueur du chemin: ' . count($this->current_page) . '
'; - foreach($this->current_page as $current){ - echo $current->getEndOfPath() . ' '; - } - die;*/ } // produit un tableau de Page en comparant le chemin demandé avec les données dans Menu 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 // -- fin des attributs destinés à doctrine, début du code utilisateur -- private array $children = []; // tableau de Node - private ?self $temp_child = null; // = "new" est l'enfant de "main" lorsque la page est "article" + private ?self $adopted = null; // = "new" est un enfant de "main" lorsque la page est "article" public function __construct(string $name = '', ?string $article_timestamp = null, array $attributes = [], int $position = 0, ?self $parent = null, ?Page $page = null, ?Article $article = null) { @@ -176,12 +176,12 @@ class Node $this->children = array_values($this->children); // réindexer pour supprimer la case vide } - public function getTempChild(): ?self // peut renvoyer null + public function getAdoptedChild(): ?self // peut renvoyer null { - return $this->temp_child; + return $this->adopted; } - public function setTempChild(self $child): void + public function setAdoptedChild(self $child): void { - $this->temp_child = $child; + $this->adopted = $child; } } -- cgit v1.2.3