You are here

function views_handler_field_url::render in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 handlers/views_handler_field_url.inc \views_handler_field_url::render()
  2. 7.3 handlers/views_handler_field_url.inc \views_handler_field_url::render()

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides views_handler_field::render

File

handlers/views_handler_field_url.inc, line 29

Class

views_handler_field_url
Field handler to provide simple renderer that turns a URL into a clickable link.

Code

function render($values) {
  $value = $this
    ->get_value($values);
  if (!empty($this->options['display_as_link'])) {
    return l($this
      ->sanitize_value($value), $value, array(
      'html' => TRUE,
    ));
  }
  else {
    return $this
      ->sanitize_value($value, 'url');
  }
}