1 | <?php |
||
5 | class PageWithImage extends Page implements RenderableAsPortlet, RenderableAsTwitterCard, SeoInformationProvider { |
||
|
|||
6 | |||
7 | // Brief summary to show on facebook and twitter when linking |
||
8 | private static $db = array( |
||
9 | 'ImageAttribution' => 'Varchar(255)', |
||
10 | 'BriefIntroduction' => 'HTMLText' |
||
11 | ); |
||
12 | |||
13 | |||
14 | static $has_one = array( |
||
15 | 'MainImage' => 'Image' |
||
16 | ); |
||
17 | |||
18 | |||
19 | // for rendering thumbnail when linked in facebook |
||
20 | function getOGImage() { |
||
23 | |||
24 | |||
25 | function getCMSFields() { |
||
35 | |||
36 | |||
37 | public function getPortletTitle() { |
||
40 | |||
41 | public function getPortletImage() { |
||
44 | |||
45 | public function getPortletCaption() { |
||
48 | |||
49 | public function getTwitterTitle() { |
||
52 | |||
53 | public function getTwitterImage() { |
||
56 | |||
57 | public function getTwitterDescription() { |
||
60 | |||
61 | public function getImagesForSeo() { |
||
69 | |||
70 | |||
71 | public function getLinksForSeo() { |
||
78 | |||
79 | } |
||
80 | |||
84 |
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.