You are here

public function DisplayPluginBase::getArgumentsTokens in Views (for Drupal 7) 8.3

Returns to tokens for arguments.

This function is similar to views_handler_field::get_render_tokens() but without fields tokens.

1 call to DisplayPluginBase::getArgumentsTokens()
DisplayPluginBase::renderMoreLink in lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Render the 'more' link

File

lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 951
Definition of Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Namespace

Drupal\views\Plugin\views\display

Code

public function getArgumentsTokens() {
  $tokens = array();
  if (!empty($this->view->build_info['substitutions'])) {
    $tokens = $this->view->build_info['substitutions'];
  }
  $count = 0;
  foreach ($this->view->display_handler
    ->getHandlers('argument') as $arg => $handler) {
    $token = '%' . ++$count;
    if (!isset($tokens[$token])) {
      $tokens[$token] = '';
    }

    // Use strip tags as there should never be HTML in the path.
    // However, we need to preserve special characters like " that
    // were removed by check_plain().
    $tokens['!' . $count] = isset($this->view->args[$count - 1]) ? strip_tags(decode_entities($this->view->args[$count - 1])) : '';
  }
  return $tokens;
}