2017 © Pedro Peláez
 

yii2-extension yii2-toggle-column

Provides a toggle data column and action

image

yii2mod/yii2-toggle-column

Provides a toggle data column and action

  • Saturday, August 26, 2017
  • by disem
  • Repository
  • 1 Watchers
  • 2 Stars
  • 3,886 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

, (*1)

Toggle Column Widget for Yii 2


Provides a toggle data column and action for Yii Framework 2.0, (*2)

Latest Stable Version Total Downloads License Build Status, (*3)

Installation

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

Either run, (*5)

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

or add, (*6)

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

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

Usage

1) In your GridView columns section:, (*8)

[
    'class' => '\yii2mod\toggle\ToggleColumn',
    'attribute' => 'active',
],

2) Add toggle action to your controller as follows:, (*9)

public function actions()
{
   return [
        'toggle' => [
            'class' => \yii2mod\toggle\actions\ToggleAction::class,
            'modelClass' => 'path\to\your\Model',
            // if you want to use flash messages
            'setFlash' => true,
            'flashSuccess' => 'Success message',
            'flashError' => 'Error message',
            'redirect' => 'some-redirect-url',
            // if you want to use custom code before saving the model
            'preProcess' => function() {
                // your custom code
            }
        ],
    ];
}

The Versions

26/08 2017

dev-master

9999999-dev

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Chepurnoy
by Igor Chepurnoi

extension yii2 column toggle

05/03 2017

1.1

1.1.0.0

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Chepurnoy

extension yii2 column toggle

03/03 2017

1.0

1.0.0.0

Provides a toggle data column and action

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Chepurnoy

extension yii2 column toggle