Код: Выделить всё
GridView::widget([
'dataProvider' => $specFieldDataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'name',
'value' => function ($data) {
return Html::a($data->name, [Url::to('/prodaction/specification-field/update?id=' . $data->id)], [
'class' => 'loadModalForm',
'id' => 'someId',
'title' => 'sometitle',
'data' => [
'modal-form' => 'modal-form-lg',
'href' => Url::to('/prodaction/specification-field/update?id=' . $data->id),
'form-action' => Url::to('/prodaction/specification-field/update?id=' . $data->id),
'title' => 'Поле: ' . $data->name,
'pjax-container' => '#spec-fields'
]
]);
},
'format' => 'html'
],
............
Код: Выделить всё
<a class="loadModalForm" href="/prodaction/specification-field/update?id=4" title="sometitle">Вид</a>