2017 © Pedro Peláez
 

yii2-extension yii2-grid-sort-column-enh

Bootstrap Grid Sort Column Enhanced Widget for Yii2 based on greshnik/yii2-grid-sort-column

image

alisherdavronov/yii2-grid-sort-column-enh

Bootstrap Grid Sort Column Enhanced Widget for Yii2 based on greshnik/yii2-grid-sort-column

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Bootstrap Grid Sort Column Enhanced Widget for Yii2

based on greshnik/yii2-grid-sort-column, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

composer require alisherdavronov/yii2-grid-sort-column-enh "*"

or add, (*4)

"alisherdavronov/yii2-grid-sort-column-enh" : "*"

to the require section of your application's composer.json file., (*5)

Usage

Example, (*6)

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

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

        ['class' => 'yii\grid\ActionColumn'],
        ['class' => 'app\gridSortColumnEnh\SortColumn'],
    ],
]); ?>

Example add sort action in controller, (*7)

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

Example add behavior in model, (*8)

public function behaviors()
{
    return [
        'sort' => [
            'class' => 'app\gridSortColumnEnh\SortBehavior',
            'attribute' => 'sort',
            'parentAttribute' => 'parentId', // optional
        ]
    ];
}

License

The BSD License (BSD). Please see License File for more information., (*9)

The Versions

24/01 2016

dev-master

9999999-dev

Bootstrap Grid Sort Column Enhanced Widget for Yii2 based on greshnik/yii2-grid-sort-column

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 yii widget grid sort column