You are here

function hook_rules_evaluator in Rules 6

Define rules input evaluators.

This hook is required in order to add a new input evaluator. It should be placed into the file MODULENAME.rules.inc.

Return value

An array of information about the module's provided input evaluators. The array contains a sub-array for each evaluator, with the name as the key.

Possible attributes for each sub-array are:

  • 'label' The label of the data type. Start capitalized. Required.
  • 'weight' A weight for controlling the evaluation order of multiple evaluators. Required.

@see rules_input_evaluator_callback_prepare(), rules_input_evaluator_callback_apply(), rules_input_evaluator_callback_help().

Related topics

1 function implements hook_rules_evaluator()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

php_rules_evaluator in rules/modules/php.rules.inc
Implementation of hook_rules_evaluator().

File

rules/rules.api.php, line 470
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_rules_evaluator() {
  return array(
    'rules_input_evaluator_php' => array(
      'label' => t('PHP Evaluation'),
      'weight' => 0,
    ),
  );
}