| 1 | <?php |
||
| 3 | class AddImageExtension extends DataExtension { |
||
|
|
|||
| 4 | private static $has_one = array( |
||
| 5 | 'MainImage' => 'Image' |
||
| 6 | ); |
||
| 7 | |||
| 8 | |||
| 9 | /* |
||
| 10 | Add a Location tab containing the map |
||
| 11 | */ |
||
| 12 | public function updateCMSFields(FieldList $fields) { |
||
| 17 | |||
| 18 | |||
| 19 | public function getPortletTitle() { |
||
| 22 | |||
| 23 | public function getPortletImage() { |
||
| 26 | |||
| 27 | public function getPortletCaption() { |
||
| 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.