aboutsummaryrefslogtreecommitdiff
path: root/src/model/entities/NodeData.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-12-24 13:20:11 +0100
committerpolo <ordipolo@gmx.fr>2025-12-24 13:20:11 +0100
commita3df76b303613141134912b426535ab8b077b77d (patch)
tree277c935ca6c54eb07b73ee978d3f232fe36f4b7a /src/model/entities/NodeData.php
parent0ec35c94c77a36894ce7d30fce290412f25b3e0e (diff)
downloadcms-a3df76b303613141134912b426535ab8b077b77d.tar.gz
cms-a3df76b303613141134912b426535ab8b077b77d.tar.bz2
cms-a3df76b303613141134912b426535ab8b077b77d.zip
renommage NodeDataAsset en AssetEmployment
Diffstat (limited to 'src/model/entities/NodeData.php')
-rw-r--r--src/model/entities/NodeData.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/model/entities/NodeData.php b/src/model/entities/NodeData.php
index d2f10ba..49bfb3c 100644
--- a/src/model/entities/NodeData.php
+++ b/src/model/entities/NodeData.php
@@ -41,8 +41,8 @@ class NodeData
41 #[ORM\Column(type: "integer", nullable: true)] 41 #[ORM\Column(type: "integer", nullable: true)]
42 private ?int $pagination_limit = null; // pour les post_block et news_block 42 private ?int $pagination_limit = null; // pour les post_block et news_block
43 43
44 #[ORM\OneToMany(mappedBy: 'node_data', targetEntity: NodeDataAsset::class, cascade: ['persist', 'remove'])] 44 #[ORM\OneToMany(mappedBy: 'node_data', targetEntity: AssetEmployment::class, cascade: ['persist', 'remove'])]
45 private Collection $nda_collection; 45 private Collection $asset_employment;
46 46
47 /*#[ORM\OneToMany(mappedBy: 'node_data', targetEntity: Email::class, cascade: ['persist', 'remove'])] // => noeud "form", inutilisé et conflit avec le tableau $emails 47 /*#[ORM\OneToMany(mappedBy: 'node_data', targetEntity: Email::class, cascade: ['persist', 'remove'])] // => noeud "form", inutilisé et conflit avec le tableau $emails
48 private Collection $emails;*/ 48 private Collection $emails;*/
@@ -50,11 +50,11 @@ class NodeData
50 private int $nb_pages = 1; 50 private int $nb_pages = 1;
51 private array $emails = []; // => noeud "show_emails" 51 private array $emails = []; // => noeud "show_emails"
52 52
53 public function __construct(array $data, Node $node, Collection $nda_collection = new ArrayCollection, ?string $presentation = null, ?bool $chrono_order = null) 53 public function __construct(array $data, Node $node, Collection $asset_employment = new ArrayCollection, ?string $presentation = null, ?bool $chrono_order = null)
54 { 54 {
55 $this->data = $data; 55 $this->data = $data;
56 $this->node = $node; 56 $this->node = $node;
57 $this->nda_collection = $nda_collection; 57 $this->asset_employment = $asset_employment;
58 if(!empty($presentation) && $presentation === 'grid'){ 58 if(!empty($presentation) && $presentation === 'grid'){
59 $this->grid_cols_min_width = 250; 59 $this->grid_cols_min_width = 250;
60 } 60 }
@@ -137,11 +137,11 @@ class NodeData
137 137
138 public function getNodeDataAssets(): Collection 138 public function getNodeDataAssets(): Collection
139 { 139 {
140 return $this->nda_collection; 140 return $this->asset_employment;
141 } 141 }
142 public function getNodeDataAssetByRole(string $role): ?NodeDataAsset 142 public function getAssetEmploymentByRole(string $role): ?AssetEmployment
143 { 143 {
144 foreach($this->nda_collection as $nda){ 144 foreach($this->asset_employment as $nda){
145 if($nda->getRole() === $role){ 145 if($nda->getRole() === $role){
146 return $nda; 146 return $nda;
147 } 147 }
@@ -150,7 +150,7 @@ class NodeData
150 } 150 }
151 public function getAssetByRole(string $role): ?Asset 151 public function getAssetByRole(string $role): ?Asset
152 { 152 {
153 $nda = $this->getNodeDataAssetByRole($role); 153 $nda = $this->getAssetEmploymentByRole($role);
154 if($nda === null){ 154 if($nda === null){
155 return null; 155 return null;
156 } 156 }