Completed
Push — master ( 0ab0a7...9c94d9 )
by Andrii
08:14
created

TemplateActionsMenu   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 27
ccs 0
cts 22
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A items() 0 22 1
1
<?php
2
3
namespace hipanel\modules\ticket\menus;
4
5
use hiqdev\menumanager\Menu;
6
use Yii;
7
8
class TemplateActionsMenu extends Menu
9
{
10
    public $model;
11
12
    public function items()
13
    {
14
        return [
15
            [
16
                'label' => Yii::t('hipanel', 'Update'),
17
                'icon' => 'fa-pencil',
18
                'url' => ['@ticket/template/update', 'id' => $this->model->id],
19
            ],
20
            [
21
                'label' => Yii::t('hipanel', 'Delete'),
22
                'icon' => 'fa-trash',
23
                'url' => ['@ticket/template/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