Completed
Push — master ( 780648...a93e4f )
by Daniel
06:19
created

CMSPageSettingsController   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEditForm() 0 6 3
A getTabIdentifier() 0 4 1
1
<?php
2
3
namespace SilverStripe\CMS\Controllers;
4
5
use SilverStripe\View\ArrayData;
6
7
class CMSPageSettingsController extends CMSMain
8
{
9
10
    private static $url_segment = 'pages/settings';
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
11
12
    private static $url_rule = '/$Action/$ID/$OtherID';
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
13
14
    private static $url_priority = 42;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
15
16
    private static $required_permission_codes = 'CMS_ACCESS_CMSMain';
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
17
18
    public function getEditForm($id = null, $fields = null)
19
    {
20
        $record = $this->getRecord($id ?: $this->currentPageID());
21
22
        return parent::getEditForm($id, ($record) ? $record->getSettingsFields() : null);
23
    }
24
25
    public function getTabIdentifier()
26
    {
27
        return 'settings';
28
    }
29
}
30