1 | <?php |
||
3 | class SlideImage extends DataObject implements PermissionProvider |
||
4 | { |
||
5 | /** |
||
6 | * @var string |
||
7 | */ |
||
8 | private static $singular_name = 'Slide'; |
||
9 | |||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private static $plural_name = 'Slides'; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private static $db = array( |
||
19 | 'Name' => 'Varchar(255)', |
||
20 | 'Headline' => 'Varchar(255)', |
||
21 | 'Description' => 'Text', |
||
22 | 'SortOrder' => 'Int', |
||
23 | 'ShowSlide' => 'Boolean', |
||
24 | ); |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private static $has_one = array( |
||
30 | 'Image' => 'Image', |
||
31 | 'Page' => 'Page', |
||
32 | 'PageLink' => 'SiteTree', |
||
33 | ); |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private static $default_sort = 'SortOrder'; |
||
|
|||
39 | |||
40 | /** |
||
41 | * @var array |
||
42 | */ |
||
43 | private static $defaults = array( |
||
44 | 'ShowSlide' => true, |
||
45 | ); |
||
46 | |||
47 | /** |
||
48 | * @var array |
||
49 | */ |
||
50 | private static $summary_fields = array( |
||
51 | 'Image.CMSThumbnail' => 'Image', |
||
52 | 'Name' => 'Name', |
||
53 | ); |
||
54 | |||
55 | /** |
||
56 | * @var array |
||
57 | */ |
||
58 | private static $searchable_fields = array( |
||
59 | 'Name', |
||
60 | 'Headline', |
||
61 | 'Description', |
||
62 | ); |
||
63 | |||
64 | /** |
||
65 | * @var int |
||
66 | */ |
||
67 | private static $image_size_limit = 512000; |
||
68 | |||
69 | /** |
||
70 | * @return FieldList |
||
71 | */ |
||
72 | 1 | public function getCMSFields() |
|
115 | 6 | ||
116 | /** |
||
117 | 6 | * @return ValidationResult |
|
118 | 1 | */ |
|
119 | 1 | public function validate() |
|
133 | |||
134 | 1 | /** |
|
135 | 1 | * @return array |
|
136 | 1 | */ |
|
137 | 1 | public function providePermissions() |
|
145 | |||
146 | 1 | /** |
|
147 | * @param null $member |
||
148 | * @return bool|int |
||
149 | */ |
||
150 | public function canCreate($member = null) |
||
154 | |||
155 | 1 | /** |
|
156 | * @param null $member |
||
157 | * @return bool|int |
||
158 | */ |
||
159 | public function canEdit($member = null) |
||
163 | |||
164 | 1 | /** |
|
165 | * @param null $member |
||
166 | * @return bool|int |
||
167 | */ |
||
168 | public function canDelete($member = null) |
||
172 | |||
173 | 1 | /** |
|
174 | * @param null $member |
||
175 | * @return bool |
||
176 | 1 | */ |
|
177 | public function canView($member = null) |
||
181 | } |
||
182 |
This check marks private properties in classes that are never used. Those properties can be removed.