mdmunir/yii2-actioncolumn

Action column dg button sesuai role

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0 2015-06-07 07:17 UTC

This package is not auto-updated.

Last update: 2024-11-23 17:41:53 UTC


README

Action column dg button sesuai role

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mdmunir/yii2-actioncolumn "dev-master"

or add

"mdmunir/yii2-actioncolumn": "dev-master"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

\Yii::$container->set('yii\grid\ActionColumn', [
    'class' => 'mdmunir\grid\ActionColumn',
    'visibleCallback' => function($name) {
        return \Yii::$app->user->can(\Yii::$app->controller->id . '/' . $name);
    },
]);