|
|
|
|
|
|
|
|
], |
|
|
], |
|
|
'name', |
|
|
'name', |
|
|
'description', |
|
|
'description', |
|
|
|
|
|
[ |
|
|
|
|
|
'attribute' => 'price', |
|
|
|
|
|
'value' => function($model) { |
|
|
|
|
|
$return = '' ; |
|
|
|
|
|
if($model->price) { |
|
|
|
|
|
$return = Price::format($model->price).' (' ; |
|
|
|
|
|
|
|
|
|
|
|
if($model->unit == 'piece') { |
|
|
|
|
|
$return .= 'la pièce' ; |
|
|
|
|
|
} |
|
|
|
|
|
elseif(in_array($model->unit, ['g','kg'])) { |
|
|
|
|
|
$return .= 'le kg' ; |
|
|
|
|
|
} |
|
|
|
|
|
elseif(in_array($model->unit, ['mL','L'])) { |
|
|
|
|
|
$return .= 'le litre' ; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$return .= ')' ; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $return ; |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
[ |
|
|
[ |
|
|
'attribute' => 'active', |
|
|
'attribute' => 'active', |
|
|
'headerOptions' => ['class' => 'active'], |
|
|
'headerOptions' => ['class' => 'active'], |