Completed
Push — master ( 9b9020...8f5910 )
by Razon
02:07
created

PermissionController::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace App\Http\Api\Backend\Controller;
3
4
use yii\rbac\Item;
5
use App\Http\Api\Backend\Model\Permission;
6
7
class PermissionController extends AuthItemController
8
{
9
    public $modelClass = Permission::class;
10
11
    public function actions()
12
    {
13
        $actions = parent::actions();
14
15
        return [
16
            'index' => $actions['index'],
17
            'options' => $actions['options'],
18
        ];
19
    }
20
21
    protected function getType()
22
    {
23
        return Item::TYPE_PERMISSION;
24
    }
25
}
26