function rules_input_evaluator_callback_help in Rules 6
Provide some usage help for the evaluator.
Usually this uses some theme function to provide themable help. It should be placed into the file MODULENAME.rules_forms.inc or into MODULENAME.rules.inc.
Parameters
$variables: An array of info about available variables.
Return value
Either a rendered string or an array as used by drupal_render().
See also
hook_rules_evaluator(), rules_input_evaluator_php_help().
Related topics
File
- rules/
rules.api.php, line 536 - 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 rules_input_evaluator_callback_help($variables) {
foreach ($variables as $name => $info) {
$form[$name] = array(
'#type' => 'fieldset',
'#title' => t('Replacement patterns for @name', array(
'@name' => $info['label'],
)),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form[$name]['content'] = array(
'#value' => theme('token_help', $info['type'], '[' . $name . ':', ']'),
);
}
return $form;
}