1 | <?php |
||
9 | class EditableFileField extends EditableFormField { |
||
|
|||
10 | |||
11 | private static $singular_name = 'File Upload Field'; |
||
12 | |||
13 | private static $plural_names = 'File Fields'; |
||
14 | |||
15 | private static $has_one = array( |
||
16 | 'Folder' => 'Folder' // From CustomFields |
||
17 | ); |
||
18 | |||
19 | /** |
||
20 | * Further limit uploadable file extensions in addition to the restrictions |
||
21 | * imposed by the File.allowed_extensions global configuration. |
||
22 | * @config |
||
23 | */ |
||
24 | private static $allowed_extensions_blacklist = array( |
||
25 | 'htm', 'html', 'xhtml', 'swf', 'xml' |
||
26 | ); |
||
27 | |||
28 | /** |
||
29 | * @return FieldList |
||
30 | */ |
||
31 | public function getCMSFields() { |
||
50 | |||
51 | public function getFormField() { |
||
80 | |||
81 | |||
82 | /** |
||
83 | * Return the value for the database, link to the file is stored as a |
||
84 | * relation so value for the field can be null. |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | public function getValueFromData() { |
||
91 | |||
92 | public function getSubmittedFormField() { |
||
95 | |||
96 | |||
97 | public function migrateSettings($data) { |
||
106 | } |
||
107 |
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.