rubin / yii2-crud-actions
Common CRUD actions for Yii2 backend
Installs: 4 189
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.0
- yiisoft/yii2: ~2.0.0
Suggests
- yii2tech/ar-position: Custom records order setup behavior for ActiveRecord
- yii2tech/ar-softdelete: Soft delete behavior for ActiveRecord
- yii2tech/ar-variation: Variation behavior for ActiveRecord
This package is auto-updated.
Last update: 2024-11-27 21:09:53 UTC
README
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', ] ]; }