aboutsummaryrefslogtreecommitdiff
path: root/src/model/entities/NodeData.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/entities/NodeData.php')
-rw-r--r--src/model/entities/NodeData.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/model/entities/NodeData.php b/src/model/entities/NodeData.php
index d8281c0..5938eca 100644
--- a/src/model/entities/NodeData.php
+++ b/src/model/entities/NodeData.php
@@ -40,21 +40,21 @@ class NodeData
40 private ?int $pagination_limit = null; // pour les post_block et news_block 40 private ?int $pagination_limit = null; // pour les post_block et news_block
41 41
42 // liaison avec table intermédiaire 42 // liaison avec table intermédiaire
43 #[ORM\ManyToMany(targetEntity: Image::class, inversedBy: "node_data")] 43 #[ORM\ManyToMany(targetEntity: Asset::class, inversedBy: "node_data")]
44 #[ORM\JoinTable( 44 #[ORM\JoinTable(
45 name: TABLE_PREFIX . "node_image", 45 name: TABLE_PREFIX . "node_asset",
46 joinColumns: [new ORM\JoinColumn(name: "node_data_id", referencedColumnName: "id_node_data", onDelete: "CASCADE")], 46 joinColumns: [new ORM\JoinColumn(name: "node_data_id", referencedColumnName: "id_node_data", onDelete: "CASCADE")],
47 inverseJoinColumns: [new ORM\JoinColumn(name: "image_id", referencedColumnName: "id_image", onDelete: "CASCADE")] 47 inverseJoinColumns: [new ORM\JoinColumn(name: "asset_id", referencedColumnName: "id_asset", onDelete: "CASCADE")]
48 )] 48 )]
49 private Collection $images; 49 private Collection $assets;
50 50
51 private int $nb_pages = 1; 51 private int $nb_pages = 1;
52 52
53 public function __construct(array $data, Node $node, Collection $images = new ArrayCollection, ?string $presentation = null, ?bool $chrono_order = null) 53 public function __construct(array $data, Node $node, Collection $assets = 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->images = $images; 57 $this->assets = $assets;
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 }
@@ -133,12 +133,12 @@ class NodeData
133 { 133 {
134 $this->node = $node; 134 $this->node = $node;
135 }*/ 135 }*/
136 public function getImages(): Collection 136 public function getAssets(): Collection
137 { 137 {
138 return $this->images; 138 return $this->assets;
139 } 139 }
140 public function setImages(Collection $images): void 140 public function setAssets(Collection $assets): void
141 { 141 {
142 $this->images = $images; 142 $this->assets = $assets;
143 } 143 }
144} 144}