function views_handler_field_url::render

Same name in other branches
  1. 7.x-3.x handlers/views_handler_field_url.inc \views_handler_field_url::render()

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');
    }
}