1 | <?php |
||
3 | class GalleryPageImageExtension extends DataExtension |
||
|
|||
4 | { |
||
5 | /** |
||
6 | * @var array |
||
7 | */ |
||
8 | private static $db = array( |
||
9 | 'Caption' => 'varchar', |
||
10 | ); |
||
11 | |||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | private static $belongs_many_many = array( |
||
16 | 'Image' => 'GalleryPage' |
||
17 | ); |
||
18 | |||
19 | /** |
||
20 | * @param FieldList |
||
21 | */ |
||
22 | public function updateCMSFields(FieldList $fields) |
||
30 | } |
||
31 |
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.