yii2-workflow-manager Workflow Manager for Yii2

Yii2 Workflow Manager

  1. Features
  2. Installation
  3. Migrations
  4. Configuration
  5. Usage
  6. License
  7. Links

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

Workflow Manager for Yii2. Extends Yii2-Workflow to provide an interface to manage workflows.

screenshot

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

Links

Mr PHP

3 0
5 followers
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: User Interface
Developed by: cornernote
Created on: Aug 29, 2016
Last updated: 8 years ago

Related Extensions