diff options
| author | polo <ordipolo@gmx.fr> | 2025-06-26 11:11:24 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-06-26 11:11:24 +0200 |
| commit | f60a9d046088b3bad3e97ff568fc83fecc67ccde (patch) | |
| tree | 7ed05b051abf68c21997e8fab70457ebb8af4b60 /src/model/entities/Node.php | |
| parent | 3e17f6ef6983a9f24ca658fd1b9f856d3f09fcd7 (diff) | |
| download | cms-f60a9d046088b3bad3e97ff568fc83fecc67ccde.tar.gz cms-f60a9d046088b3bad3e97ff568fc83fecc67ccde.tar.bz2 cms-f60a9d046088b3bad3e97ff568fc83fecc67ccde.zip | |
ajout dans css_array à la création d'un bloc
Diffstat (limited to 'src/model/entities/Node.php')
| -rw-r--r-- | src/model/entities/Node.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/model/entities/Node.php b/src/model/entities/Node.php index 711eb3e..c4d0830 100644 --- a/src/model/entities/Node.php +++ b/src/model/entities/Node.php | |||
| @@ -98,13 +98,15 @@ class Node | |||
| 98 | { | 98 | { |
| 99 | $this->attributes = self::$default_attributes; | 99 | $this->attributes = self::$default_attributes; |
| 100 | } | 100 | } |
| 101 | /*public function addAttribute(string $key, string $value): void | 101 | public function addAttribute(string $key, string $value): void |
| 102 | { | 102 | { |
| 103 | if(!isset($this->attributes[$key])) { // sécurité $key inexistante | 103 | if(!isset($this->attributes[$key])) { // sécurité $key inexistante |
| 104 | $this->attributes[$key] = []; | 104 | $this->attributes[$key] = []; |
| 105 | } | 105 | } |
| 106 | $this->attributes[$key][] = $value; | 106 | if(!in_array($value, $this->attributes[$key])){ |
| 107 | }*/ | 107 | $this->attributes[$key][] = $value; |
| 108 | } | ||
| 109 | } | ||
| 108 | /*public function removeAttribute(string $key, string $value): void | 110 | /*public function removeAttribute(string $key, string $value): void |
| 109 | { | 111 | { |
| 110 | if(isset($this->attributes[$key])) // sécurité $key inexistante | 112 | if(isset($this->attributes[$key])) // sécurité $key inexistante |
