rubin/yii2-crud-actions

Common CRUD actions for Yii2 backend

Installs: 4 107

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 1

Open Issues: 0

Type:yii2-extension

1.0.2 2020-10-27 12:19 UTC

This package is auto-updated.

Last update: 2024-10-27 21:01:03 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',
        ]
    ];
}