Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
en:start:task_management [2016/07/07 14:54] admin created |
en:start:task_management [2016/07/07 14:56] admin [WfTask*.php] |
||
---|---|---|---|
Line 20: | Line 20: | ||
The Workflow Designer will ask you some questions, how you would define the new task. | The Workflow Designer will ask you some questions, how you would define the new task. | ||
- | - **The key** | + | - **The key** \\ This is the slug of the Block, which will be used to store the relation in the database. Must be unique! |
- | This is the slug of the Block, which will be used to store the relation in the database. Must be unique! | + | - **The classname** \\ Must be a value with the Prefix “WfTask”. For example **WfTaskNewBlock**. This is the classname of the new block. |
- | - **The classname** | + | - **The label** \\ The label, visible in the sidebar and below every block. Should describe the function of this block. |
- | Must be a value with the Prefix “WfTask”. For example WfTaskNewBlock. This is the classname of the new block. | + | |
- | - **The label** | + | |
- | The label, visible in the sidebar and below every block. Should describe the function of this block. | + | |
- | Then the Workflow Designer will create the necessary files. | + | Then the Workflow Designer will create the necessary files. \\ |
the block will create in the task group “special tools”. | the block will create in the task group “special tools”. | ||
Line 37: | Line 34: | ||
</WRAP> | </WRAP> | ||
+ | This file must have a special structure. | ||
+ | |||
+ | <Code> | ||
+ | <?php | ||
+ | require_once(realpath(dirname(__FILE__).'/../autoload_wf.php')); | ||
+ | |||
+ | class dummyTypeClass extends \Workflow\Task | ||
+ | { | ||
+ | public function handleTask(&$context) { | ||
+ | /* Insert here source code to execute the task */ | ||
+ | |||
+ | return "yes"; | ||
+ | } | ||
+ | |||
+ | public function beforeGetTaskform($viewer) { | ||
+ | /* Insert here source code to create custom configurations pages */ | ||
+ | } | ||
+ | public function beforeSave(&$values) { | ||
+ | /* Insert here source code to modify the values the user submit on configuration */ | ||
+ | } | ||
+ | } | ||
+ | </Code> |