1 | <?php |
||
23 | abstract class Gallery implements GalleryInterface, GalleryMediaCollectionInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $context; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $name; |
||
34 | |||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | protected $enabled; |
||
39 | |||
40 | /** |
||
41 | * @var \DateTime|null |
||
42 | */ |
||
43 | protected $updatedAt; |
||
44 | |||
45 | /** |
||
46 | * @var \DateTime|null |
||
47 | */ |
||
48 | protected $createdAt; |
||
49 | |||
50 | /** |
||
51 | * @var string |
||
52 | */ |
||
53 | protected $defaultFormat = MediaProviderInterface::FORMAT_REFERENCE; |
||
54 | |||
55 | /** |
||
56 | * @var GalleryItemInterface[]|Collection |
||
57 | */ |
||
58 | protected $galleryItems; |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function __toString() |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function setName($name): void |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function getName() |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | public function setEnabled($enabled): void |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function getEnabled() |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function setUpdatedAt(?\DateTime $updatedAt = null): void |
||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | public function getUpdatedAt() |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public function setCreatedAt(?\DateTime $createdAt = null): void |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | public function getCreatedAt() |
||
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | */ |
||
135 | public function setDefaultFormat($defaultFormat): void |
||
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | public function getDefaultFormat() |
||
147 | |||
148 | /** |
||
149 | * {@inheritdoc} |
||
150 | */ |
||
151 | public function setGalleryItems($galleryItems): void |
||
159 | |||
160 | /** |
||
161 | * {@inheritdoc} |
||
162 | */ |
||
163 | public function getGalleryItems() |
||
167 | |||
168 | /** |
||
169 | * {@inheritdoc} |
||
170 | */ |
||
171 | public function addGalleryItem(GalleryItemInterface $galleryItem): void |
||
177 | |||
178 | /** |
||
179 | * {@inheritdoc} |
||
180 | */ |
||
181 | public function setContext($context): void |
||
185 | |||
186 | /** |
||
187 | * {@inheritdoc} |
||
188 | */ |
||
189 | public function getContext() |
||
193 | |||
194 | /** |
||
195 | * Reorders $galleryItems based on their position. |
||
196 | */ |
||
197 | public function reorderGalleryItems() |
||
214 | } |
||
215 |