<commit_before>Bootstrap Grid Sort Column Widget for Yii2
====================================


Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require greshnik/yii2-grid-sort-column "*"
```
or add

```json
"greshnik/yii2-grid-sort-column" : "*"
```

to the require section of your application's `composer.json` file.

Usage
-----

***Example***

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

        'id',
        'name',
        'class',

        ['class' => 'yii\grid\ActionColumn'],
        ['class' => 'app\gridSortColumn\SortColumn']
    ],
]); ?>
```  
***Example add sort action in controller***

```  
public function actions()
{
    return [
        'swap' => [
            'class' => 'app\gridSortColumn\Swap',
            'model' => new Mark,
            'attribute' => 'sortAttribute'
        ]
    ];
}
```

License
-------

The BSD License (BSD). Please see [License File](LICENSE.md) for more information.<commit_msg>doc for behavior<commit_after>Bootstrap Grid Sort Column Widget for Yii2
====================================


Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require greshnik/yii2-grid-sort-column "*"
```
or add

```json
"greshnik/yii2-grid-sort-column" : "*"
```

to the require section of your application's `composer.json` file.

Usage
-----

***Example***

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

        'id',
        'name',
        'class',

        ['class' => 'yii\grid\ActionColumn'],
        ['class' => 'app\gridSortColumn\SortColumn']
    ],
]); ?>
```  
***Example add sort action in controller***

```  
public function actions()
{
    return [
        'swap' => [
            'class' => 'app\gridSortColumn\Swap',
            'model' => new Mark,
            'attribute' => 'sortAttribute'
        ]
    ];
}
```

***Example add behavior in model***

```
public function behaviors()
{
    return [
        'sort' => [
            'class' => 'app\gridSortColumn\SortBehavior',
            'attribute' => 'sort'
        ]
    ];
}
```

License
-------

The BSD License (BSD). Please see [License File](LICENSE.md) for more information.
{'fraction_non_alphanumeric': 0.20953131153997637, 'fraction_numerical': 0.0023631350925561244, 'mean_word_length': 2.6285714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '548769', 'n_tokens_mistral': 797, 'n_tokens_neox': 768, 'n_words': 181}