Returns a string with any core tokens replaced.
string $string: The string to preform the token replacement on.
array $options: An array of options, as passed to \Drupal\Core\Utility\Token::replace().
string The tokenized string.
public function globalTokenReplace($string = '', array $options = array()) {
return \Drupal::token()
->replace($string, array(
'view' => $this->view,
), $options);
}