Differences

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

Link to this comparison view

Both sides previous revision Previous revision
en:extensions:workflowdesigner:developers [2015/01/21 14:35]
swarnat [use custom Inventory Fields]
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 ====