You are here

function theme_rules_parameter_configuration in Rules 7.2

Themes the view of a single parameter configuration.

1 theme call to theme_rules_parameter_configuration()
RulesPluginUI::buildContent in ui/ui.core.inc
Implements RulesPluginUIInterface.

File

ui/ui.theme.inc, line 139
Rules theme functions.

Code

function theme_rules_parameter_configuration($variables) {
  $element = $variables['element'];
  $content = drupal_render_children($element);

  // Add the full content to the span's title, but don't use drupal_attributes
  // for that as this would invoke check_plain() again.
  $title = strip_tags($content);
  $element['#attributes']['class'][] = 'rules-parameter-configuration';
  $attributes = drupal_attributes($element['#attributes']) . " title='{$title}'";
  $label_attributes['class'][] = 'rules-parameter-label';
  if (!empty($element['#info']['description'])) {
    $label_attributes['title'] = $element['#info']['description'];
  }
  $label_attributes = drupal_attributes($label_attributes);
  $output = "<span {$label_attributes}>" . check_plain($element['#info']['label']) . ': </span>';
  $output .= "<span {$attributes}>" . truncate_utf8($content, 30, TRUE, TRUE) . "</span>";
  return $output;
}