1 | <?php |
||
7 | class TileSection_ContentTile extends DataObject |
||
|
|||
8 | { |
||
9 | private static $singular_name = 'Content Tile'; |
||
10 | private static $plural_name = 'Content Tiles'; |
||
11 | |||
12 | private static $casting = [ |
||
13 | 'RenderTile' => 'HTMLText' |
||
14 | ]; |
||
15 | |||
16 | private static $db = [ |
||
17 | 'Title' => 'Text', |
||
18 | 'Caption' => 'Text', |
||
19 | 'Sort' => 'Int' |
||
20 | ]; |
||
21 | |||
22 | private static $has_one = [ |
||
23 | 'Image' => 'Image', |
||
24 | 'Link' => 'Link', |
||
25 | 'Parent' => 'ContentBlock_TileSection', |
||
26 | ]; |
||
27 | |||
28 | private static $default_sort = 'Sort ASC'; |
||
29 | |||
30 | public function getCMSFields() |
||
43 | |||
44 | /** |
||
45 | * @return RequiredFields |
||
46 | */ |
||
47 | public function getCMSValidator() |
||
55 | |||
56 | /** |
||
57 | * Gets the chosen template name from the parent {@link ContentBlock_TileSection} |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getTemplateName() |
||
67 | |||
68 | /** |
||
69 | * Renders the Tile into the parent {@link ContentBlock_TileSection}'s chosen template |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function RenderTile() |
||
79 | |||
80 | /** |
||
81 | * Gets the configured classes for a row |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function TileClasses() |
||
93 | } |
||
94 |
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.