From 1e2cee519264f9ab2660540723915aec72bc2116 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 20 Oct 2025 01:57:21 +0200 Subject: =?UTF-8?q?noeud=20"head"=20unique,=20noms=20fichiers=20CSS=20et?= =?UTF-8?q?=20JSS=20dans=20page,=20nombreux=20changements=20en=20cons?= =?UTF-8?q?=C3=A9quences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/entities/Node.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/model/entities/Node.php') diff --git a/src/model/entities/Node.php b/src/model/entities/Node.php index db081e4..fe3a1e5 100644 --- a/src/model/entities/Node.php +++ b/src/model/entities/Node.php @@ -22,9 +22,6 @@ class Node #[ORM\Column(type: "string", length: 255)] private string $name_node; - #[ORM\Column(type: "json", nullable: true)] // type: "json" crée un longtext avec mariadb - private ?array $attributes = null; - #[ORM\Column(type: "integer")] private int $position; @@ -52,12 +49,10 @@ class Node // attributs non destinés à doctrine private array $children = []; // tableau de Node private ?self $adopted = null; // = "new" est un enfant de "main" lorsque la page est "article" - static private array $default_attributes = ['css_array' => ['body', 'head', 'nav', 'foot'],'js_array' => ['main']]; - public function __construct(string $name = '', array $attributes = [], int $position = 0, ?self $parent = null, ?Page $page = null, ?Article $article = null) + public function __construct(string $name = '', int $position = 0, ?self $parent = null, ?Page $page = null, ?Article $article = null) { $this->name_node = $name; - $this->attributes = $attributes; $this->position = $position; $this->parent = $parent; $this->page = $page; @@ -77,7 +72,8 @@ class Node { $this->name_node = $name; }*/ - public function getAttributes(): array + + /*public function getAttributes(): array { return $this->attributes; } @@ -97,7 +93,7 @@ class Node if(!in_array($value, $this->attributes[$key])){ $this->attributes[$key][] = $value; } - } + }*/ /*public function removeAttribute(string $key, string $value): void { if(isset($this->attributes[$key])) // sécurité $key inexistante -- cgit v1.2.3