Completed
Push — adminEvent ( 4f32ee...32adf5 )
by Andreas
19:59 queued 14:26
created

Admin   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A visibleInContext() 0 7 2
1
<?php
2
3
namespace dokuwiki\Menu\Item;
4
5
/**
6
 * Class Admin
7
 *
8
 * Opens the Admin screen. Only shown to managers or above
9
 */
10
class Admin extends AbstractItem {
11
12
    /** @inheritdoc */
13
    public function __construct() {
14
        parent::__construct();
15
16
        $this->svg = DOKU_INC . 'lib/images/menu/settings.svg';
17
    }
18
19
    /** @inheritdoc */
20
    public function visibleInContext($ctx)
21
    {
22
        global $INFO;
23
        if(!$INFO['ismanager']) return false;
24
25
        return parent::visibleInContext($ctx);
26
    }
27
28
}
29