2017 © Pedro Peláez
 

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

Sortable modification of Kartik Yii2 GridView widget

image

naduvko/yii2-sortable-grid-view-widget

Sortable modification of Kartik Yii2 GridView widget

  • Tuesday, July 24, 2018
  • by naduvko
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 33 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Sortable GridView Widget for Yii2

Sortable modification of Kartik GridView widget., (*1)

Total Downloads Latest Stable Version License, (*2)

Installation

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

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

or add, (*4)

"naduvko/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 naduvko\sortablegrid\SortableGridBehavior;

public function behaviors()
{
    return [
        'sort' => [
            'class' => SortableGridBehavior::className(),
            'sortableAttribute' => 'sortOrder'
        ],
    ];
}
  • Add action in the controller, for example:
use naduvko\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

24/07 2018

1.1.0.x-dev

1.1.0.9999999-dev

Sortable modification of Kartik Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview

24/07 2018

dev-master

9999999-dev

Sortable modification of Kartik Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview

24/07 2018

1.1.0

1.1.0.0

Sortable modification of Kartik Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview