function rules_action_custom_php in Rules 6
Custom php action: Fires up the input evaluator manually and returns it's return value.
Related topics
1 string reference to 'rules_action_custom_php'
- workflow_ng_action_custom_php_upgrade in rules/
modules/ php.rules_forms.inc - The following functions help converting the workflow-ng php condition/actions when upgrading from workflow-ng
File
- rules/
modules/ php.rules.inc, line 125 - rules integration for the php module This provides an php input evaluator as well as a execute php code action.
Code
function rules_action_custom_php($settings, $element, &$state) {
// Note that php code inside of <?php is executed by the input evaluator,
// while this will execute the resulting string.
return rules_input_evaluator_php_apply($settings['code'], $settings['vars'], $state, FALSE);
}