You are here

function views_handler_area_link::get_render_tokens in Views link area 6

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

Gets appropriate views replacement tokens for this handler.

This code is largely based on views_handler_field's token rendering, but we only care about arguments. The render() method's link generation handles XSS for us.

1 call to views_handler_area_link::get_render_tokens()
views_handler_area_link::render in ./views_handler_area_link.inc
Render the area

File

./views_handler_area_link.inc, line 111

Class

views_handler_area_link

Code

function get_render_tokens() {
  $tokens = array();
  if (!empty($this->view->build_info['substitutions'])) {
    $tokens = $this->view->build_info['substitutions'];
  }
  $count = 0;
  foreach ($this->view->display_handler
    ->get_handlers('argument') as $arg => $handler) {
    $token = '%' . ++$count;
    if (!isset($tokens[$token])) {
      $tokens[$token] = '';
    }
    $tokens['!' . $count] = isset($this->view->args[$count - 1]) ? check_plain($this->view->args[$count - 1]) : '';
  }
  return $tokens;
}