2017 © Pedro Peláez
 

yii2-extension yii2-toggle-column

Provides a toggle data column and action

image

pheme/yii2-toggle-column

Provides a toggle data column and action

  • Tuesday, January 17, 2017
  • by pheme
  • Repository
  • 6 Watchers
  • 20 Stars
  • 80,311 Installations
  • PHP
  • 9 Dependents
  • 0 Suggesters
  • 20 Forks
  • 5 Open issues
  • 8 Versions
  • 9 % Grown

The README.md

Toggle data column for Yii2

Provides a toggle data column and action, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist pheme/yii2-toggle-column "*"

or add, (*4)

"pheme/yii2-toggle-column": "*"

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

Usage

Once the extension is installed, simply use it in your code by :, (*6)

// In your Controller
use pheme\grid\actions\ToggleAction;

public function actions()
{
    return [
        'toggle' => [
            'class' => ToggleAction::className(),
            'modelClass' => 'path\to\your\Model',
            // Uncomment to enable flash messages
            //'setFlash' => true,
        ]
    ];
}

// In your view
use yii\grid\GridView;
use yii\widgets\Pjax;

Pjax::begin();

GridView::widget(
    [
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            'id',
            [
                'class' => '\pheme\grid\ToggleColumn',
                'attribute' => 'active',
                // Uncomment if  you don't want AJAX
                // 'enableAjax' => false,
            ],
            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]
);

Pjax::end();

The Versions

17/01 2017

dev-master

9999999-dev

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

by Aris Karageorgos

extension yii2 column toggle

23/12 2016

0.7

0.7.0.0

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

by Aris Karageorgos

extension yii2 column toggle

10/10 2016

0.6

0.6.0.0

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

by Aris Karageorgos

extension yii2 column toggle

09/09 2016

0.5

0.5.0.0

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

by Aris Karageorgos

extension yii2 column toggle

20/05 2016

0.4

0.4.0.0

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

by Aris Karageorgos

extension yii2 column toggle

10/03 2016

0.3

0.3.0.0

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

by Aris Karageorgos

extension yii2 column toggle

07/08 2015

0.2

0.2.0.0

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

by Aris Karageorgos

extension yii2 column toggle

12/10 2014

0.1

0.1.0.0

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

by Aris Karageorgos

extension yii2 column toggle