1 | <?php |
||
19 | class HeaderGalleryImage extends DataObject |
||
|
|||
20 | { |
||
21 | |||
22 | |||
23 | private static $db = array( |
||
24 | 'Title' => 'Text', |
||
25 | 'Copyright' => 'Text', |
||
26 | 'Caption' => 'Text', |
||
27 | 'SortOrder' => 'Int' |
||
28 | ); |
||
29 | |||
30 | private static $has_one = array( |
||
31 | 'Attachment' => 'Image', |
||
32 | 'ResourcePage' => 'Page', |
||
33 | 'SiteConfig' => 'SiteConfig' |
||
34 | ); |
||
35 | |||
36 | |||
37 | private static $default_sort = 'SortOrder ASC'; |
||
38 | |||
39 | private static $delete_permission = "CMS_ACCESS_CMSMain"; |
||
40 | |||
41 | public function getCMSFields() |
||
54 | |||
55 | /** |
||
56 | * Show delete Button in ImageGalleryManager |
||
57 | */ |
||
58 | |||
59 | public function canDelete($member = null) |
||
63 | |||
64 | public function canView($member = null) |
||
68 | |||
69 | public function canCreate($member = null) |
||
73 | |||
74 | public function canEdit($member = null) |
||
78 | |||
79 | /** |
||
80 | * shortcut for displaying copyright information and caption |
||
81 | * @return string |
||
82 | */ |
||
83 | public function getDescription() |
||
87 | |||
88 | /** |
||
89 | * replaces "(c)" with html copyright sign |
||
90 | * @return mixed |
||
91 | */ |
||
92 | public function getCopy() |
||
96 | } |
||
97 |
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.