1 | <?php |
||
3 | class DMSDocumentCartSubmission extends DataObject |
||
|
|||
4 | { |
||
5 | private static $db = array( |
||
6 | 'ReceiverName' => 'Varchar(100)', |
||
7 | 'ReceiverPhone' => 'Varchar(20)', |
||
8 | 'ReceiverEmail' => 'Varchar(254)', |
||
9 | 'DeliveryAddressLine1' => 'Varchar(200)', |
||
10 | 'DeliveryAddressLine2' => 'Varchar(200)', |
||
11 | 'DeliveryAddressCountry' => 'Varchar(50)', |
||
12 | 'DeliveryAddressPostCode' => 'Varchar(20)', |
||
13 | ); |
||
14 | |||
15 | private static $has_many = array( |
||
16 | 'Items' => 'DMSDocumentCartSubmissionItem', |
||
17 | ); |
||
18 | |||
19 | private static $summary_fields = array( |
||
20 | 'ReceiverName' => 'Receiver Name', |
||
21 | 'ReceiverPhone' => 'Receiver Phone', |
||
22 | 'ReceiverEmail' => 'Receiver Email', |
||
23 | 'Items.Count' => 'No. Items', |
||
24 | 'Created.Nice' => 'Created At' |
||
25 | ); |
||
26 | |||
27 | private static $singular_name = 'Cart Submission'; |
||
28 | private static $plural_name = 'Cart Submissions'; |
||
29 | |||
30 | /** |
||
31 | * Removing the add and existing GridField components to ensure that the model admin for submissions doesn't |
||
32 | * let you add new records |
||
33 | * |
||
34 | * @return FieldList |
||
35 | */ |
||
36 | public function getCMSFields() |
||
52 | } |
||
53 |
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.