Conditions | 4 |
Paths | 8 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
13 | public function items() |
||
14 | { |
||
15 | return [ |
||
16 | [ |
||
17 | 'label' => Yii::t('hipanel', 'View'), |
||
18 | 'icon' => 'fa-info', |
||
19 | 'url' => ['@ticket/view', 'id' => $this->model->id], |
||
20 | ], |
||
21 | [ |
||
22 | 'label' => $this->model->state === Thread::STATE_OPEN ? Yii::t('hipanel:ticket', 'Close') : Yii::t('hipanel:ticket', 'Open'), |
||
23 | 'icon' => $this->model->state === Thread::STATE_OPEN ? 'fa-times' : 'fa-envelope-open-o', |
||
24 | 'url' => $this->model->state === Thread::STATE_OPEN ? ['@ticket/close', 'id' => $this->model->id] : ['@ticket/open', 'id' => $this->model->id], |
||
25 | ], |
||
26 | ]; |
||
27 | } |
||
28 | } |