<commit_before><?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel app\models\MyUserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Пользователи';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="my-users-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <!--        --><? //= Html::a('Create My User', ['create'], ['class' => 'btn btn-success']) ?>

    </p>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'email',
            'name',


            [
                'attribute' => 'role_id',
                'label' => 'Роль',
                'content' => function ($data) {
                    return $data->role->title;
                },
                'filter' => \yii\helpers\ArrayHelper::map(\app\models\Roles::find()->all(), 'id', 'title')
            ],


            ['class' => 'yii\grid\ActionColumn'],<commit_msg>под php 5.6<commit_after><?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel app\models\MyUserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Пользователи';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="my-users-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <!--        --><? //= Html::a('Create My User', ['create'], ['class' => 'btn btn-success']) ?>

    </p>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'email',
            'name',


            [
                'attribute' => 'role_id',
                'label' => 'Роль',
                'content' => function ($data) {
                    return isset($data->role->title) ? $data->role->title : '';
                },
                'filter' => \yii\helpers\ArrayHelper::map(\app\models\Roles::find()->all(), 'id', 'title')
            ],


            ['class' => 'yii\grid\ActionColumn'],
{'fraction_non_alphanumeric': 0.22203461376108063, 'fraction_numerical': 0.002532714225411566, 'mean_word_length': 2.054123711340206, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2249474', 'n_tokens_mistral': 778, 'n_tokens_neox': 758, 'n_words': 126}