1 | <?php |
||
9 | class FoxyCartProductCategory extends DataObject |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | private static $db = array( |
||
16 | 'Title' => 'Varchar(255)', |
||
17 | 'Code' => 'Varchar(50)' |
||
18 | ); |
||
19 | |||
20 | private static $singular_name = 'FoxyCart Category'; |
||
21 | private static $plural_name = 'FoxyCart Categories'; |
||
22 | private static $description = 'Set the FoxyCart Category on a Product'; |
||
23 | |||
24 | private static $summary_fields = array( |
||
25 | 'Title' => 'Name', |
||
26 | 'Code' => 'Code' |
||
27 | ); |
||
28 | |||
29 | private static $indexes = array( |
||
30 | 'Code' => true |
||
31 | ); |
||
32 | |||
33 | public function getCMSFields() |
||
60 | |||
61 | public function requireDefaultRecords() |
||
72 | |||
73 | public function canView($member = false) |
||
77 | |||
78 | public function canEdit($member = null) |
||
82 | |||
83 | public function canDelete($member = null) |
||
89 | |||
90 | public function canCreate($member = null) |
||
94 | |||
95 | } |
||
96 |