If you reach the limit of the module you maybe want to extend the features directly with PHP.
The easiest way is to add your own function to custom expressions.
Create a new file inside modules/Workflow2/extends/functions/ with the filename <individual>.inc.php
All functions with the nameprefix wf_ you define in this file, will be available during custom expressions.
If you break the PHP Syntax and integrate an Error in this file, no Workflow could be executed, because this files are included in most tasks!
For example, an function, which is currently integrated in Core:
if(!function_exists("wf_date")) {
function wf_date($value, $interval, $format = "Y-m-d") {
if(empty($interval)) {
$dateValue = strtotime($value);
} else {
$dateValue = strtotime($interval, strtotime($value));
}
return date($format, $dateValue);
}
}
Artikel-PDF herunterladen