1 | <?php |
||
3 | class NutriRow extends DataObject |
||
|
|||
4 | { |
||
5 | private static $default_rows = array(); |
||
6 | |||
7 | private static $singular_name = 'Nutritional Information Item'; |
||
8 | public function i18n_singular_name() |
||
12 | |||
13 | private static $plural_name = 'Nutritional Information Items'; |
||
14 | public function i18n_plural_name() |
||
18 | |||
19 | private static $db = array( |
||
20 | 'Title' => 'Varchar(30)', |
||
21 | 'PerServe' => 'Varchar(20)', |
||
22 | 'Per100' => 'Varchar(20)', |
||
23 | 'DVPercentage' => 'Varchar(20)', |
||
24 | 'Hide' => 'Boolean', |
||
25 | 'SortOrder' => 'Int', |
||
26 | ); |
||
27 | |||
28 | private static $has_one = array( |
||
29 | 'NutriHolder' => 'NutriHolder', |
||
30 | ); |
||
31 | |||
32 | private static $default_sort = array( |
||
33 | 'Hide' => 'ASC', |
||
34 | 'SortOrder' => 'ASC' |
||
35 | ); |
||
36 | |||
37 | private static $summary_fields = array( |
||
38 | 'Title' => 'Title', |
||
39 | 'PerServe' => 'Per Serve', |
||
40 | 'Per100' => 'Per 100', |
||
41 | 'Hide.Nice' => 'Hidden' |
||
42 | ); |
||
43 | |||
44 | private static $indexes = array( |
||
45 | 'SortOrder' => true |
||
46 | ); |
||
47 | |||
48 | public function Shown() |
||
52 | |||
53 | /** |
||
54 | * |
||
55 | * |
||
56 | * @inherited |
||
57 | */ |
||
58 | public function canDelete($member = null) |
||
68 | |||
69 | public function getCMSFields() |
||
101 | |||
102 | |||
103 | public function requireDefaultRecords() |
||
128 | } |
||
129 |
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.