1 | <?php |
||
8 | class HeaderGalleryExtension extends DataExtension |
||
|
|||
9 | { |
||
10 | |||
11 | private static $has_many = array( |
||
12 | 'HeaderGallery' => 'HeaderGalleryImage' |
||
13 | ); |
||
14 | |||
15 | /** |
||
16 | * Limit the number of displayed header images |
||
17 | * If set to 1 we have a single upload field |
||
18 | * @var int |
||
19 | */ |
||
20 | private static $limit_header_images = 0; |
||
21 | |||
22 | private static $delete_permission = "CMS_ACCESS_CMSMain"; |
||
23 | |||
24 | |||
25 | public function updateCMSFields(FieldList $fields) |
||
51 | |||
52 | /** |
||
53 | * Helper for getting the header gallery in the template |
||
54 | * Tries to find the current gallery, falls back to parent pages and home-page or SiteConfig if it has a standard gallery |
||
55 | * @return null|void |
||
56 | */ |
||
57 | public function getHeaderPics() |
||
75 | |||
76 | public function getGalleryOwner() |
||
85 | |||
86 | public function getGalleryOfParent($owner) |
||
94 | |||
95 | /** |
||
96 | * Helper to get the default header pics from e.g. SiteConfig |
||
97 | * @return DataList|null|SS_Limitable |
||
98 | */ |
||
99 | public function getDefaultHeaderPics() |
||
114 | |||
115 | /** |
||
116 | * limits the number of displayed items |
||
117 | * |
||
118 | * @param DataList $galleryList |
||
119 | * @return DataList|SS_Limitable |
||
120 | */ |
||
121 | protected function LimitGalleryItems(DataList $galleryList) |
||
127 | } |
||
128 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.