You are here

function views_handler_area_link::render in Views link area 6

Same name and namespace in other branches
  1. 7 views_handler_area_link.inc \views_handler_area_link::render()

Render the area

Overrides views_handler_area::render

File

./views_handler_area_link.inc, line 84

Class

views_handler_area_link

Code

function render($empty = FALSE) {
  if (!$empty || !empty($this->options['empty'])) {
    $tokens = $this
      ->get_render_tokens();
    $link_options = array();
    if (!empty($this->options['query'])) {
      $link_options['query'] = strtr($this->options['query'], $tokens);
    }
    if (!empty($this->options['anchor'])) {
      $link_options['anchor'] = strtr($this->options['anchor'], $tokens);
    }
    if (!empty($this->options['class'])) {
      $link_options['attributes'] = array(
        'class' => strtr($this->options['class'], $tokens),
      );
    }
    return l(strtr($this->options['text'], $tokens), strtr($this->options['path'], $tokens), $link_options);
  }
  return '';
}