| 1 | <?php |
||
| 12 | class RecommendedSearchPlusSection extends DataObject |
||
|
|
|||
| 13 | { |
||
| 14 | private static $db = array( |
||
| 15 | "Title" => "Varchar(255)", |
||
| 16 | "Intro" => "Text", |
||
| 17 | "Sort" => "Int" |
||
| 18 | ); |
||
| 19 | |||
| 20 | private static $has_one = array( |
||
| 21 | "ParentPage" => "Page", |
||
| 22 | "Parent" => "SearchPlusPage" |
||
| 23 | ); |
||
| 24 | |||
| 25 | private static $defaults = array( |
||
| 26 | "Sort" => 100 |
||
| 27 | ); |
||
| 28 | |||
| 29 | private static $singular_name = 'Recommended SearchPlus Section'; |
||
| 30 | |||
| 31 | private static $plural_name = 'Recommended SearchPlus Sections'; |
||
| 32 | |||
| 33 | private static $default_sort = 'Sort, Title'; |
||
| 34 | |||
| 35 | private static $searchable_fields = array( |
||
| 36 | "Title" |
||
| 37 | ); |
||
| 38 | |||
| 39 | private static $summary_fields = array( |
||
| 40 | "Title", "Sort" |
||
| 41 | ); |
||
| 42 | |||
| 43 | private static $field_labels = array( |
||
| 44 | "Sort" => "Sort Index" |
||
| 45 | ); |
||
| 46 | |||
| 47 | public function getCMSFields() |
||
| 55 | |||
| 56 | public function onBeforeWrite() |
||
| 67 | } |
||
| 68 |
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.