rubin/yii2-crud-actions

Common CRUD actions for Yii2 backend

Installs: 10

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.0 2018-11-14 22:47 UTC

README

Latest Stable Version

Yii2 CRUD actions

Часто используемые действия для админки, вынесенные в отдельные Actions. Настраиваемые.

Установка

composer require rubin/yii2-crud-actions

Пример использования

Для личного использования, подробной документации не будет.

public function actions()
{
    return [
        'index' => [
            'class' => 'rubin\yii2\crud\actions\ModelIndexAction',
            'searchModel' => new CameraSearch(),
        ],
        'view' => [
            'class' => 'rubin\yii2\crud\actions\ModelViewAction',
        ],
        'create' => [
            'class' => 'rubin\yii2\crud\actions\ModelCreateAction',
            'model' =>  new Camera(),
        ],
        'update' => [
            'class' => 'rubin\yii2\crud\actions\ModelUpdateAction',
        ],
        'delete' => [
            'class' => 'rubin\yii2\crud\actions\ModelDeleteAction',
        ],
        'position' => [
            'class' => 'rubin\yii2\crud\actions\ModelPositionAction',
        ]
    ];
}