function RulesPHPDataProcessor::process

Overrides RulesDataProcessor::process().

Parameters

$value: The value to process.

$info: Info about the parameter for which we process the value.

RulesState $state: The rules evaluation state.

RulesPlugin $element: The element for which we process the value.

Return value

The processed value.

Overrides RulesDataProcessor::process

File

modules/php.eval.inc, line 121

Class

RulesPHPDataProcessor
A data processor using PHP.

Code

public function process($value, $info, RulesState $state, RulesPlugin $element) {
  $value = isset($this->processor) ? $this->processor
    ->process($value, $info, $state, $element) : $value;
  return rules_php_eval_return($this->setting['code'], array(
    'value' => $value,
  ));
}