@@ 81-88 (lines=8) @@ | ||
78 | 'object->name' => [ |
|
79 | 'label' => Yii::t('hipanel', 'Object'), |
|
80 | 'format' => 'raw', |
|
81 | 'value' => function (Price $model) { |
|
82 | $link = LinkToObjectResolver::widget([ |
|
83 | 'model' => $model->object, |
|
84 | 'labelAttribute' => 'name', |
|
85 | ]); |
|
86 | ||
87 | return $link ?: Yii::t('hipanel.finance.price', 'Any'); |
|
88 | }, |
|
89 | ], |
|
90 | 'object->name-any' => [ |
|
91 | 'label' => Yii::t('hipanel', 'Object'), |
@@ 95-105 (lines=11) @@ | ||
92 | 'format' => 'raw', |
|
93 | 'filterAttribute' => 'object_like', |
|
94 | 'enableSorting' => false, |
|
95 | 'value' => function (Sale $model) { |
|
96 | if ($model instanceof FakeGroupingSale) { |
|
97 | return $model->object; |
|
98 | } |
|
99 | ||
100 | return LinkToObjectResolver::widget([ |
|
101 | 'model' => $model, |
|
102 | 'typeAttribute' => 'tariff_type', |
|
103 | 'idAttribute' => 'object_id', |
|
104 | ]); |
|
105 | }, |
|
106 | ], |
|
107 | ]); |
|
108 | } |