You are here

function theme_entityreference_label in Entity reference 7

Theme label.

1 theme call to theme_entityreference_label()
entityreference_field_formatter_view in ./entityreference.module
Implements hook_field_formatter_view().

File

./entityreference.module, line 1458
Entityreference primary module file.

Code

function theme_entityreference_label($vars) {
  $label = $vars['label'];
  $settings = $vars['settings'];
  $item = $vars['item'];
  $uri = $vars['uri'];
  $output = '';

  // If the link is to be displayed and the entity has a uri, display a link.
  // Note the assignment ($url = ) here is intended to be an assignment.
  if ($settings['display']['link'] && isset($uri['path'])) {
    $output .= l($label, $uri['path'], $uri['options']);
  }
  else {
    $output .= check_plain($label);
  }
  return $output;
}