jinowom/yii2-workflow-manager
最新稳定版本:v1.0.8
Composer 安装命令:
composer require jinowom/yii2-workflow-manager
包简介
jinowom-workflow Manager for Yii2
关键字:
README 文档
README
jinowom-workflow Manager for Yii2 友情提示: 本程序代码仅供特定业务自用; 如自行使用,不确保其在任何环境中的可用性。 tips: This program code is only used for specific business; If it is used by itself, its availability in any environment is not guaranteed.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist jinowom/yii2-workflow-manager "*"
or add
"jinowom/yii2-workflow-manager": "*"
to the require section of your composer.json file.
Configuration
$config = [ 'components' => [ 'workflowSource' => [ 'class' => 'jinowom\workflow\manager\components\WorkflowDbSource', ], ], 'modules' => [ 'workflow' => [ 'class' => 'jinowom\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' => \jinowom\workflow\base\SimpleWorkflowBehavior::className(), 'defaultWorkflowId' => 'post', 'propagateErrorsToModel' => true, ], ]; } }
Usage
Once the extension is installed, simply use it in your code by :
<?= \jinowom\workflow\manager\AutoloadExample::widget(); ?>``` ## Links - [Yii2 Extension](http://www.yiiframework.com/extension/yii2-workflow-manager) - [Composer Package](https://packagist.org/packages/jinowom/yii2-workflow-manager)
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-10-30