You are here

function StylePluginBase::uses_tokens in Views (for Drupal 7) 8.3

Return TRUE if this style uses tokens.

Used to ensure we don't fetch tokens when not needed for performance.

File

lib/Drupal/views/Plugin/views/style/StylePluginBase.php, line 165
Definition of Drupal\views\Plugin\views\style\StylePluginBase.

Class

StylePluginBase
Base class to define a style plugin handler.

Namespace

Drupal\views\Plugin\views\style

Code

function uses_tokens() {
  if ($this
    ->usesRowClass()) {
    $class = $this->options['row_class'];
    if (strpos($class, '[') !== FALSE || strpos($class, '!') !== FALSE || strpos($class, '%') !== FALSE) {
      return TRUE;
    }
  }
}