1 entityreference.module theme_entityreference_label($vars)

Theme label.

File

core/modules/entityreference/entityreference.module, line 1538
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;
}