| Conditions | 2 |
| Paths | 1 |
| Total Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function columns() |
||
| 20 | { |
||
| 21 | return array_merge(parent::columns(), [ |
||
| 22 | 'tariff' => [ |
||
| 23 | 'class' => 'hipanel\grid\MainColumn', |
||
| 24 | 'filterAttribute' => 'tariff_like', |
||
| 25 | 'note' => Yii::$app->user->can('tariff.update') ? 'note' : null, |
||
| 26 | 'noteOptions' => [ |
||
| 27 | 'url' => Url::to('set-note'), |
||
| 28 | ], |
||
| 29 | ], |
||
| 30 | 'used' => [ |
||
| 31 | 'filter' => false, |
||
| 32 | ], |
||
| 33 | 'type' => [ |
||
| 34 | 'class' => RefColumn::class, |
||
| 35 | 'i18nDictionary' => 'hipanel:finance:tariff:types', |
||
| 36 | 'gtype' => 'type,tariff', |
||
| 37 | 'value' => function ($model) { |
||
| 38 | return Yii::t('hipanel:finance:tariff:types', $model->type); |
||
| 39 | }, |
||
| 40 | ], |
||
| 41 | ]); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |