Completed
Push — master ( cab21e...ed90cc )
by Daniel
02:43
created

CMSPageSettingsController::getTabIdentifier()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace SilverStripe\CMS\Controllers;
4
5
class CMSPageSettingsController extends CMSMain
6
{
7
8
    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...
9
10
    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...
11
12
    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...
13
14
    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...
15
16
    public function getEditForm($id = null, $fields = null)
17
    {
18
        $record = $this->getRecord($id ?: $this->currentPageID());
19
20
        return parent::getEditForm($id, ($record) ? $record->getSettingsFields() : null);
21
    }
22
23
    public function Breadcrumbs($unlinked = false)
24
    {
25
        $crumbs = parent::Breadcrumbs($unlinked);
26
        $crumbs[0]->Title = _t('SilverStripe\\CMS\\Controllers\\CMSPagesController.MENUTITLE', 'Pages');
27
        return $crumbs;
28
    }
29
30
    public function getTabIdentifier()
31
    {
32
        return 'settings';
33
    }
34
}
35