cornernote / yii2-workflow-manager
Workflow Manager for Yii2.
Installs: 29 144
Dependents: 26
Suggesters: 0
Security: 0
Stars: 37
Watchers: 8
Forks: 19
Open Issues: 4
Type:yii2-extension
Requires
- raoul2000/yii2-workflow: @dev
- raoul2000/yii2-workflow-view: @dev
- yiisoft/yii2: *
- yiisoft/yii2-jui: ~2.0.0
Requires (Dev)
- phpunit/phpunit: 4.*
- scrutinizer/ocular: ~1.1
This package is auto-updated.
Last update: 2024-12-14 13:39:20 UTC
README
Workflow Manager for Yii2. Extends Yii2-Workflow to provide an interface to manage workflows.
Features
- Create and manage workflows, statuses and transitions using a simple interface.
- Manage metadata for each status to allow additional data such as colors and icons.
- Displays the workflow transitions using Yii2 Workflow View
Installation
The preferred way to install this extension is through composer.
Either run
$ composer require cornernote/yii2-workflow-manager "*"
or add
"cornernote/yii2-workflow-manager": "*"
to the require
section of your composer.json
file.
Migrations
$ php yii migrate --migrationPath=@cornernote/workflow/manager/migrations
Configuration
$config = [ 'components' => [ 'workflowSource' => [ 'class' => 'cornernote\workflow\manager\components\WorkflowDbSource', ], ], 'modules' => [ 'workflow' => [ 'class' => 'cornernote\workflow\manager\Module', ], ], ];
Usage
Simply visit ?r=workflow
within your application to start managing workflows.
Once you have defined a workflow, you can attach it to a model as follows:
class Post extends \yii\db\ActiveRecord { public function behaviors() { return [ [ 'class' => \raoul2000\workflow\base\SimpleWorkflowBehavior::className(), 'defaultWorkflowId' => 'post', 'propagateErrorsToModel' => true, ], ]; } }
License
- Author: Brett O'Donnell cornernote@gmail.com
- Source Code: https://github.com/cornernote/yii2-workflow-manager
- Copyright © 2016 Mr PHP info@mrphp.com.au
- License: BSD-3-Clause https://raw.github.com/cornernote/yii2-workflow-manager/master/LICENSE