1 | <?php |
||
3 | class ContactUsSiteConfigExtension extends DataExtension |
||
|
|||
4 | { |
||
5 | |||
6 | private static $db = [ |
||
7 | 'ContactUsFormEmail' => 'Varchar(100)', |
||
8 | 'ContactUsFormEnquiryLabel' => 'Varchar(50)', |
||
9 | 'ContactUsFormSendLabel' => 'Varchar(50)', |
||
10 | 'ContactUsFormThankYouMessage' => 'HTMLText' |
||
11 | ]; |
||
12 | |||
13 | private static $defaults = [ |
||
14 | 'ContactUsFormEnquiryLabel' => 'Message', |
||
15 | 'ContactUsFormSendLabel' => 'Send', |
||
16 | 'ContactUsFormThankYouMessage' => '<p class="message good">Thank you for your enquiry.</p>' |
||
17 | ]; |
||
18 | |||
19 | private static $field_labels = [ |
||
20 | 'ContactUsFormEmail' => 'Email to use', |
||
21 | 'ContactUsFormEnquiryLabel' => 'Label for Message Box', |
||
22 | 'ContactUsFormSendLabel' => 'Send Button Label', |
||
23 | 'ContactUsFormThankYouMessage' => 'Message to show as thank you.' |
||
24 | ]; |
||
25 | |||
26 | /** |
||
27 | * Update Fields |
||
28 | * @return FieldList |
||
29 | */ |
||
30 | public function updateCMSFields(FieldList $fields) |
||
45 | |||
46 | |||
47 | |||
48 | } |
||
49 |
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.