1 | <?php |
||
15 | class BaseSliderItem extends \DataObject { |
||
|
|||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | * @config |
||
20 | */ |
||
21 | private static $db = [ |
||
22 | 'Title' => 'Varchar', |
||
23 | 'Content' => 'HTMLText', |
||
24 | 'SortOrder' => 'Int', |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | * @config |
||
30 | */ |
||
31 | private static $has_one = [ |
||
32 | 'Block' => 'SliderBlock', |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * The default sort expression. This will be inserted in the ORDER BY |
||
37 | * clause of a SQL query if no other sort expression is provided. |
||
38 | * |
||
39 | * @var string |
||
40 | * @config |
||
41 | */ |
||
42 | private static $default_sort = 'SortOrder ASC'; |
||
1 ignored issue
–
show
|
|||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | public function singular_name() { |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | public function plural_name() { |
||
57 | |||
58 | /** |
||
59 | * Default summary fields within localized label title's. |
||
60 | * |
||
61 | * @return array |
||
62 | */ |
||
63 | public function summaryFields() { |
||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getSliderType() { |
||
76 | |||
77 | /** |
||
78 | * @return \FieldList |
||
79 | */ |
||
80 | public function getCMSFields() { |
||
97 | |||
98 | /** |
||
99 | * @param bool $includeRelations |
||
100 | * |
||
101 | * @return array |
||
102 | */ |
||
103 | public function fieldLabels($includeRelations = true) { |
||
113 | |||
114 | /** |
||
115 | * @return \HTMLText |
||
116 | */ |
||
117 | public function forTemplate() { |
||
122 | } |
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.