application/modules/shop/controllers/BackendCurrenciesController.php 1 location
|
@@ 52-57 (lines=6) @@
|
| 49 |
|
'class' => UpdateEditable::className(), |
| 50 |
|
'modelName' => Currency::className(), |
| 51 |
|
'allowedAttributes' => [ |
| 52 |
|
'currency_rate_provider_id' => function(Currency $model, $attribute) { |
| 53 |
|
if ($model === null || $model->rateProvider === null || $model->currency_rate_provider_id===0) { |
| 54 |
|
return null; |
| 55 |
|
} |
| 56 |
|
return \yii\helpers\Html::tag('div', $model->rateProvider->name, ['class' => $model->rateProvider->name]); |
| 57 |
|
}, |
| 58 |
|
], |
| 59 |
|
], |
| 60 |
|
]; |
application/modules/shop/controllers/BackendProductController.php 1 location
|
@@ 95-104 (lines=10) @@
|
| 92 |
|
'class' => UpdateEditable::className(), |
| 93 |
|
'modelName' => Product::className(), |
| 94 |
|
'allowedAttributes' => [ |
| 95 |
|
'currency_id' => function (Product $model, $attribute) { |
| 96 |
|
if ($model === null || $model->currency === null || $model->currency_id === 0) { |
| 97 |
|
return null; |
| 98 |
|
} |
| 99 |
|
return \yii\helpers\Html::tag( |
| 100 |
|
'div', |
| 101 |
|
$model->currency->name, |
| 102 |
|
['class' => $model->currency->name] |
| 103 |
|
); |
| 104 |
|
}, |
| 105 |
|
'price', |
| 106 |
|
'old_price', |
| 107 |
|
'active' => function (Product $model) { |
application/modules/shop/views/backend-product/index.php 1 location
|
@@ 211-220 (lines=10) @@
|
| 208 |
|
'name' |
| 209 |
|
), |
| 210 |
|
'format' => 'raw', |
| 211 |
|
'value' => function ($model) { |
| 212 |
|
if ($model === null || $model->currency === null || $model->currency_id === 0) { |
| 213 |
|
return null; |
| 214 |
|
} |
| 215 |
|
return \yii\helpers\Html::tag( |
| 216 |
|
'div', |
| 217 |
|
$model->currency->name, |
| 218 |
|
['class' => $model->currency->name] |
| 219 |
|
); |
| 220 |
|
}, |
| 221 |
|
], |
| 222 |
|
[ |
| 223 |
|
'class' => 'kartik\grid\EditableColumn', |