<commit_before><?php

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

$this->title = 'Clients';
$this->params['breadcrumbs'][] = $this->title;

?>

<h1><?php echo $cl_var1InView; ?></h1>


<div>

    <?php foreach ($arrayInView as $item): ?>
        <p>
            <a href ="/site/clients_detail/<?= $item ->id?>"><?php echo $item -> name ?></a>
        </p>


    <?php endforeach; ?>


</div>

<div>
    <p>
        <h2>А тут начнеться GridView</h2>
    </p>

</div>

<div class="category-index">

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

<p>
    <?= Html::a('Добавить клиента', ['create'], ['class' => 'btn btn-success']) ?>
</p>

<?= GridView::widget(
    [
        /**
        * Экземпляр класса, который реализует \yii\data\DataProviderInterface. В нашем случае ActiveDataProvider
        */
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'showHeader' => true,
        'showFooter'=> false,
        // 'emptyCell' => '-',
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            'name',
            'inn',
            'email',
            [
                'attribute' => 'status',
                'format' => 'raw',
                'filter' => [
                    0 => 'Inactive',
                    1 => 'Active',
                ],

                'value' => function ($model) {
                    return $model->status == '1' ? 'Active' : 'Blocked';

                },



                //'label'=>'Active22',
            ],
<commit_msg>Начало изучения CRUD<commit_after><?php

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

$this->title = 'Clients';
$this->params['breadcrumbs'][] = $this->title;

?>

<h1><?php echo $cl_var1InView; ?></h1>


<div>

    <?php foreach ($arrayInView as $item): ?>
        <p>
            <a href ="/site/clients_detail/<?= $item ->id?>"><?php echo $item -> name ?></a>
        </p>


    <?php endforeach; ?>


</div>

<div>
    <p>
        <h2>А тут начнеться GridView</h2>
    </p>

</div>

<div class="category-index">

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

<p>
    <?= Html::a('Добавить клиента', ['create'], ['class' => 'btn btn-success']) ?>
</p>

<?= GridView::widget(
    [
        /**
        * Экземпляр класса, который реализует \yii\data\DataProviderInterface. В нашем случае ActiveDataProvider
        */
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'showHeader' => true,
        'showFooter'=> false,
        // 'emptyCell' => '-',
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            'name',
            'inn',
            'email',
            [
                'attribute' => 'status',
                'format' => 'raw',
                'filter' => [
                    0 => 'Inactive',
                    1 => 'Active',
                ],

                'value' => function ($model) {
                    return $model->status == '1' ? 'Active' : 'Inactive';

                },



                //'label'=>'Active22',
            ],

{'fraction_non_alphanumeric': 0.19935897435897437, 'fraction_numerical': 0.00641025641025641, 'mean_word_length': 1.678969957081545, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 99, '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': '480407', 'n_tokens_mistral': 1056, 'n_tokens_neox': 1044, 'n_words': 200}