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 | public function __toString() |
||
64 | |||
65 | public function setName($name): void |
||
69 | |||
70 | public function getName() |
||
74 | |||
75 | public function setEnabled($enabled): void |
||
79 | |||
80 | public function getEnabled() |
||
84 | |||
85 | public function setUpdatedAt(?\DateTime $updatedAt = null): void |
||
89 | |||
90 | public function getUpdatedAt() |
||
94 | |||
95 | public function setCreatedAt(?\DateTime $createdAt = null): void |
||
99 | |||
100 | public function getCreatedAt() |
||
104 | |||
105 | public function setDefaultFormat($defaultFormat): void |
||
109 | |||
110 | public function getDefaultFormat() |
||
114 | |||
115 | public function setGalleryItems($galleryItems): void |
||
123 | |||
124 | public function getGalleryItems() |
||
128 | |||
129 | public function addGalleryItem(GalleryItemInterface $galleryItem): void |
||
135 | |||
136 | public function setContext($context): void |
||
140 | |||
141 | public function getContext() |
||
145 | |||
146 | /** |
||
147 | * Reorders $galleryItems based on their position. |
||
148 | */ |
||
149 | public function reorderGalleryItems() |
||
166 | } |
||
167 |