1 | <?php |
||
3 | class SideTextWidgetDataObject extends DataObject |
||
|
|||
4 | { |
||
5 | public static $db = array( |
||
6 | "Title" => "Text", |
||
7 | "Body" => "HTMLText", |
||
8 | "Caption" => "Varchar", |
||
9 | "TextLinkExternal" => "Varchar(255)", |
||
10 | "LinkText" => "Varchar(255)" |
||
11 | ); |
||
12 | |||
13 | public static $has_one = array( |
||
14 | "Image" => "Image", |
||
15 | "ImageLink" => "SiteTree", |
||
16 | "TextLinkInternal" => "SiteTree" |
||
17 | ); |
||
18 | public static $summary_fields = array("Title" => "Title"); |
||
19 | public static $singular_name = "Sidebar Section"; |
||
20 | public static $plural_name = "Sidebar Sections"; |
||
21 | |||
22 | //defaults |
||
23 | public static $default_sort = "Title"; |
||
24 | |||
25 | public function getCMSFields() |
||
43 | } |
||
44 |
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.