You are here

function rules_input_evaluators_help in Rules 6

Returns help for the input evalutors as an array as suitable for drupal_render().

1 call to rules_input_evaluators_help()
rules_admin_default_argument_form in rules_admin/rules_admin.rule_forms.inc
Returns the argument form for the given element

File

rules/rules.input_evaluators.inc, line 98
Rules input evaluation system.

Code

function rules_input_evaluators_help($element, $variables) {
  $render = array();
  if (rules_get_settings_to_evaluate($element) && $variables) {
    rules_include('rules_forms');
    foreach (rules_get_input_evaluators() as $base => $info) {
      $render[$base] = array(
        '#type' => 'fieldset',
        '#title' => check_plain($info['label']),
        '#collapsible' => TRUE,
        '#collapsed' => TRUE,
        '#weight' => $info['weight'],
      );
      $return = call_user_func_array($base . '_help', array(
        $variables,
      ));
      $render[$base]['content'] = is_array($return) ? $return : array(
        '#value' => $return,
      );
    }
  }
  return $render;
}