Completed
Push — master ( 1436fc...7e0f0d )
by Simon
01:30
created

PageController::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
use Psr\Log\LoggerInterface;
4
use SilverStripe\CMS\Controllers\ContentController;
5
use SilverStripe\Core\Injector\Injector;
6
7
class PageController extends ContentController
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
8
{
9
    /**
10
     * An array of actions that can be accessed via a request. Each array element should be an action name, and the
11
     * permissions or conditions required to allow the user to access it.
12
     *
13
     * <code>
14
     * array (
15
     *     'action', // anyone can access this action
16
     *     'action' => true, // same as above
17
     *     'action' => 'ADMIN', // you must have ADMIN permissions to access this action
18
     *     'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
19
     * );
20
     * </code>
21
     *
22
     * @var array
23
     */
24
    private static $allowed_actions = array(
0 ignored issues
show
Unused Code introduced by
The property $allowed_actions is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
25
    );
26
27
    /**
28
     *
29
     */
30
    protected function init()
31
    {
32
        parent::init();
33
        // You can include any CSS or JS required by your project here.
34
        // See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/
35
    }
36
}