Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:extensions:workflowdesigner:developers [2015/01/21 14:34]
swarnat
en:extensions:workflowdesigner:developers [2016/07/22 12:38] (current)
swarnat
Line 285: Line 285:
 \Workflow\Fieldtype::​register('​[IndividualNameA]',​ '​\Workflow\Plugins\Fieldtypes\[IndividualNameA]'​);​ \Workflow\Fieldtype::​register('​[IndividualNameA]',​ '​\Workflow\Plugins\Fieldtypes\[IndividualNameA]'​);​
 </​code>​ </​code>​
 +
 +==== add own shortfunctions ====
 +
 +If you want to add a custom "​shortfunction"​ you could use with the syntax $[...], then you must do the following.
 +Create one file, with filename **<​custom>​.inc.php** in folder modules/​Workflow2/​extends/​shortfunctions/​
 +
 +Only required code is:
 +
 +<​code>​
 +\Workflow\Shortfunctions::​register('​shortfunctionname',​ <​CallAble Object>, $parametersShouldBeParsed);​
 +</​code>​
 +
 +The callable object could be any callable element, php could execute. For example an closure, or string with function name. Any possible option you see here: [[http://​php.net/​manual/​de/​language.types.callable.php]]
 +
 +And you must implement this callable object with your PHP code. **That'​s all!**
  
 ==== use custom Inventory Fields ==== ==== use custom Inventory Fields ====
Line 315: Line 330:
 | FieldNameWithoutProductIndex | This is the Key of the value in the ProductsArray. You use this value in the "​getAssociatedProducts"​ function | | FieldNameWithoutProductIndex | This is the Key of the value in the ProductsArray. You use this value in the "​getAssociatedProducts"​ function |
 | Testvalue | The label of this field, which will be shown on task configurations | | Testvalue | The label of this field, which will be shown on task configurations |
 +
 +This structure will make it possible to also set this fields if you create an Invoice in an Workflow.