title = Yii::t('relation', 'Relations');
$this->params['breadcrumbs'][] = $this->title;
?>
    
= Html::encode($this->title) ?>
     $relations,
        'sort' => [
            'attributes' => ['name', 'key', 'entity1_label', 'entity2_label'],
        ],
        'pagination' => [
            'pageSize' => 10,
        ],
    ]);
    ?>
    = GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            'name',
            'key',
            'entity1_label',
            'entity2_label',
            [
                'class' => 'yii\grid\ActionColumn',
                'template' => '{view}',
                'buttons' => [
                    'view' => function ($url, $model) {
                        return Html::a('', $url, [
                            'title' => Yii::t('relation', 'View pars'),
                        ]);
                    },
                ],
                'urlCreator' => function ($action, $model) {
                    if ($action === 'view') {
                        $url ='/admin/relation/manage/pars?relation='. $model['key'];
                        return $url;
                    }
                }
            ],
        ],
    ]); ?>