You are here

function rules_condition_custom_php in Rules 6

Custom php condition: Fires up the input evaluator manually and returns it's return value.

Related topics

1 string reference to 'rules_condition_custom_php'
workflow_ng_condition_custom_php_upgrade in rules/modules/php.rules_forms.inc

File

rules/modules/php.rules.inc, line 148
rules integration for the php module This provides an php input evaluator as well as a execute php code action.

Code

function rules_condition_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);
}