function RulesTokenEvaluator::prepare

Overrides RulesDataInputEvaluator::prepare().

Parameters

string $text: The text to evaluate later on.

array $variables: An array of info about available variables.

array $param_info: (optional) An array of information about the handled parameter value. For backward compatibility, this parameter is not required.

Overrides RulesDataInputEvaluator::prepare

File

modules/system.eval.inc, line 186

Class

RulesTokenEvaluator
A class implementing a rules input evaluator processing tokens.

Code

public function prepare($text, $var_info) {
  $text = is_array($text) ? implode('', $text) : $text;
  // Skip this evaluator if there are no tokens.
  $this->setting = token_scan($text) ? TRUE : NULL;
}