Conditions | 2 |
Paths | 2 |
Total Lines | 27 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
14 | public function items() |
||
15 | { |
||
16 | return [ |
||
17 | [ |
||
18 | 'label' => $this->renderView('_change-password', ['model' => $this->model]), |
||
19 | 'encode' => false, |
||
20 | ], |
||
21 | [ |
||
22 | 'label' => $this->renderView('_manage-ip-restrictions', ['model' => $this->model]), |
||
23 | 'encode' => false, |
||
24 | ], |
||
25 | [ |
||
26 | 'label' => $this->renderView('_mail-settings', ['model' => $this->model]), |
||
27 | 'encode' => false, |
||
28 | 'visible' => $this->model->canSetMailSettings(), |
||
29 | ], |
||
30 | [ |
||
31 | 'label' => $this->renderView('_block', ['model' => $this->model, 'blockReasons' => $this->blockReasons]), |
||
32 | 'encode' => false, |
||
33 | 'visible' => Yii::$app->user->can('support') && Yii::$app->user->id !== $this->model->client_id, |
||
34 | ], |
||
35 | [ |
||
36 | 'label' => $this->renderView('_delete', ['model' => $this->model]), |
||
37 | 'encode' => false, |
||
38 | ], |
||
39 | ]; |
||
40 | } |
||
41 | |||
47 |