function theme_rules_variable_view

Themes info about variables.

3 theme calls to theme_rules_variable_view()
RulesContainerPluginUI::buildContent in ui/ui.core.inc
Implements RulesPluginUIInterface.
RulesLoopUI::buildContent in ui/ui.plugins.inc
Implements RulesPluginUIInterface.
RulesPluginUI::buildContent in ui/ui.core.inc
Implements RulesPluginUIInterface.

File

ui/ui.theme.inc, line 164

Code

function theme_rules_variable_view($variables) {
    $element = $variables['element'];
    $label_attributes['class'][] = 'rules-variable-label';
    $label_attributes['title'] = '';
    if (!empty($element['#info']['description'])) {
        $label_attributes['title'] = $element['#info']['description'] . ' ';
    }
    $label_attributes['title'] .= t('Data type: !type', array(
        '!type' => $element['#info']['type'],
    ));
    $label_attributes = drupal_attributes($label_attributes);
    $output = check_plain($element['#info']['label']);
    $output .= ' (' . check_plain($element['#name']) . ')';
    return "<span {$label_attributes}>" . $output . '</span>';
}