| Total Complexity | 2 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 3 | class NewsPage extends DatedUpdatePage { |
||
| 4 | |||
| 5 | private static $description = 'Describes an item of news'; |
||
|
|
|||
| 6 | |||
| 7 | private static $default_parent = 'NewsHolderPage'; |
||
| 8 | |||
| 9 | private static $can_be_root = false; |
||
| 10 | |||
| 11 | private static $icon = 'cwp/images/icons/sitetree_images/news.png'; |
||
| 12 | |||
| 13 | private static $singular_name = 'News Page'; |
||
| 14 | |||
| 15 | private static $plural_name = 'News Pages'; |
||
| 16 | |||
| 17 | private static $db = array( |
||
| 18 | 'Author' => 'Varchar(255)' |
||
| 19 | ); |
||
| 20 | |||
| 21 | private static $has_one = array( |
||
| 22 | 'FeaturedImage' => 'Image' |
||
| 23 | ); |
||
| 24 | |||
| 25 | public $pageIcon = 'images/icons/sitetree_images/news.png'; |
||
| 26 | |||
| 27 | public function fieldLabels($includerelations = true) { |
||
| 28 | $labels = parent::fieldLabels($includerelations); |
||
| 29 | $labels['Author'] = _t('DateUpdatePage.AuthorFieldLabel', 'Author'); |
||
| 30 | $labels['FeaturedImageID'] = _t('DateUpdatePage.FeaturedImageFieldLabel', 'Featured Image'); |
||
| 31 | |||
| 32 | return $labels; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getCMSFields() { |
||
| 50 | } |
||
| 51 | } |
||
| 56 |