Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 4.4237 |
Changes | 0 |
1 | <?php |
||
42 | 1 | public function getCMSFields() |
|
43 | { |
||
44 | 1 | $fields = parent::getCMSFields(); |
|
45 | |||
46 | $fields->addFieldsToTab('Root.Main', array( |
||
47 | NumericField::create('Limit'), |
||
48 | )); |
||
49 | |||
50 | if (class_exists('Blog')) { |
||
51 | $fields->addFieldToTab( |
||
52 | 'Root.Main', |
||
53 | DropdownField::create('BlogID', 'Featured Blog', Blog::get()->map()) |
||
54 | ->setEmptyString('') |
||
55 | ); |
||
56 | } |
||
57 | |||
58 | return $fields; |
||
59 | } |
||
60 | |||
84 | } |