label Дата доставки value function common models order Order model del

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
[
'label' => 'Дата доставки',
'value' => function (\common\models\order\Order $model) {
$deliveryOptions = $model->getDeliveryOptions();
$stringDateTime = [];
if (isset($deliveryOptions['date'])) {
$stringDateTime[] = $deliveryOptions['date'];
}
if (isset($deliveryOptions['time'])) {
$stringDateTime[] = $deliveryOptions['time'];
}
return implode(' ', $stringDateTime);
}
],