title = Yii::t('common/customer', 'Customers'); $this->params['breadcrumbs'][] = $this->title; ?>

title) ?>

render('_search', ['model' => $searchModel]); ?>

'btn btn-success']) ?>

$dataProvider, 'columns' => [ [ 'attribute' => 'customerCardNumber' , ], 'name', 'email:email', 'phone', 'created_at:datetime', ['class' => 'yii\grid\ActionColumn', 'template' =>'{view} {update} {ticket/index-customer}', 'buttons' => [ 'ticket/index-customer' => function ($url) { return Html::a( ' ', $url, [ 'title' => 'Bérletek' ] ); } ], 'urlCreator' =>function ($action, $model, $key, $index){ $params = is_array($key) ? $key : ['id' => (string) $key]; if ( $action == 'ticket/index-customer' ){ $today = \Yii::$app->formatter->asDate( strtotime('today UTC') ); $tomorrow = \Yii::$app->formatter->asDate( strtotime( 'tomorrow UTC' )); $params['TicketSearch[start]'] = $today; $params['TicketSearch[end]'] = $tomorrow; } $params[0] = $action; return Url::toRoute($params); } ], ], ]); ?>