2017 © Pedro Peláez
 

yii2-extension yii2-grid-group-actions

Yii2 extension GridView with group actions

image

starcode/yii2-grid-group-actions

Yii2 extension GridView with group actions

  • Thursday, December 10, 2015
  • by starcode-solutions
  • Repository
  • 5 Watchers
  • 0 Stars
  • 53 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 6 % Grown

The README.md

Yii2 Grid Group Actions

Yii2 extension GridView with group actions., (*1)

Installation

Via composer, (*2)

composer require "starcode/yii2-grid-group-actions:*"

or add composer.json, (*3)

{
    "require": {
        "starcode/yii2-grid-group-actions": "1.*"
    }
}

Usage

Create group actions controller., (*4)


// ... public $modelClass = 'app\models\User'; // ... public function actions() { return [ 'delete-group' => [ 'class' => GroupAction::className(), 'run' => function($model) { $model->delete(); } ], 'publish-group' => [ 'class' => GroupAction::className(), 'changeAttributes' => ['status' => User::STATUS_ACTIVE], ], ]; } // ...

Output widget., (*5)

= GridView::widget([
    'dataProvider' => $dataProvider,
    'actionsButtonsOptions' => [
        'buttonsTemplate' => '{delete-group}',
        'buttons' => [
            'delete-group' => function($url, $widget) {
                $options = array_merge([
                    'form' => $widget->formId,
                    'formaction' => $url,
                    'formmethod' => $widget->formMethod,
                    'name' => 'submit',
                    'class' => 'btn btn-danger',
                ], $widget->buttonOptions);
                return Html::submitButton('', $options);
            },
        ]
    ],
    'filterModel' => $searchModel,
    'columns' => [
        'id',
        'fullName',
        'email:email',
        [
            'class' => 'yii\grid\ActionColumn',
        ],
    ],
]); ?>

The Versions

10/12 2015

dev-master

9999999-dev

Yii2 extension GridView with group actions

  Sources   Download

MIT

The Requires

 

by Memory Clutter

yii2 table widget grid view

10/12 2015

1.1.0

1.1.0.0

Yii2 extension GridView with group actions

  Sources   Download

MIT

The Requires

 

by Memory Clutter

yii2 table widget grid view

10/12 2015

1.0.1

1.0.1.0

Yii2 extension GridView with group actions

  Sources   Download

MIT

The Requires

 

by Memory Clutter

yii2 table widget grid view

10/12 2015

1.0.0

1.0.0.0

Yii2 extension GridView with group actions

  Sources   Download

MIT

The Requires

 

by Memory Clutter

yii2 table widget grid view