2017 © Pedro Peláez
 

yii2-extension yii2-sortable-grid-view-widget

Sortable modification of standard Yii2 GridView widget

image

himiklab/yii2-sortable-grid-view-widget

Sortable modification of standard Yii2 GridView widget

  • Tuesday, February 27, 2018
  • by HimikLab
  • Repository
  • 10 Watchers
  • 69 Stars
  • 47,535 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 33 Forks
  • 2 Open issues
  • 6 Versions
  • 9 % Grown

The README.md

Sortable GridView Widget for Yii2

Sortable modification of standard Yii2 GridView widget., (*1)

Packagist Packagist license, (*2)

Installation

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

  • Either run
php composer.phar require --prefer-dist "himiklab/yii2-sortable-grid-view-widget" "*"

or add, (*4)

"himiklab/yii2-sortable-grid-view-widget" : "*"

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

  • Add to your database new unsigned int attribute, such sortOrder., (*6)

  • Add new behavior in the AR model, for example:, (*7)

use himiklab\sortablegrid\SortableGridBehavior;

public function behaviors()
{
    return [
        'sort' => [
            'class' => SortableGridBehavior::className(),
            'sortableAttribute' => 'sortOrder'
        ],
    ];
}
  • Add action in the controller, for example:
use himiklab\sortablegrid\SortableGridAction;

public function actions()
{
    return [
        'sort' => [
            'class' => SortableGridAction::className(),
            'modelName' => Model::className(),
        ],
    ];
}

Usage

  • Use SortableGridView as standard GridView with sortableAction option. You can also subscribe to the JS event 'sortableSuccess' generated widget after a successful sorting.

The Versions

27/02 2018

dev-master

9999999-dev

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview

27/02 2018

1.0.11

1.0.11.0

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview

02/11 2017

1.0.10

1.0.10.0

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview

07/11 2016

1.0.9

1.0.9.0

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview

01/03 2016

1.0.8

1.0.8.0

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview

13/10 2015

1.0.7

1.0.7.0

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview