rubin/yii2-crud-actions

Common CRUD actions for Yii2 backend

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.1 2019-11-15 19:06 UTC

This package is auto-updated.

Last update: 2020-05-15 20:37:52 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',
        ]
    ];
}