Completed
Push — master ( 7d4d5b...453053 )
by Klochok
06:27
created

RequestActionsMenu::items()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 22
ccs 0
cts 13
cp 0
rs 9.2
c 0
b 0
f 0
cc 1
eloc 15
nc 1
nop 0
crap 2
1
<?php
2
3
namespace hipanel\modules\hosting\menus;
4
5
use hiqdev\menumanager\Menu;
6
use Yii;
7
8
class RequestActionsMenu extends Menu
9
{
10
    public $model;
11
12
    public function items()
13
    {
14
        return [
15
            'view' => [
16
                'label' => Yii::t('hipanel', 'View'),
17
                'icon' => 'fa-info',
18
                'url' => ['@request/view', 'id' => $this->model->id],
19
            ],
20
            'delete' => [
21
                'label' => Yii::t('hipanel', 'Delete'),
22
                'icon' => 'fa-trash-o',
23
                'url' => ['@request/delete', 'id' => $this->model->id],
24
                'linkOptions' => [
25
                    'data' => [
26
                        'confirm' => Yii::t('hipanel', 'Are you sure you want to delete this item?'),
27
                        'method' => 'post',
28
                        'pjax' => '0',
29
                    ],
30
                ]
31
            ],
32
        ];
33
    }
34
}
35