You are here

public function StylePluginBase::usesTokens in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::usesTokens()
  2. 9 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::usesTokens()

Return TRUE if this style uses tokens.

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

File

core/modules/views/src/Plugin/views/style/StylePluginBase.php, line 191

Class

StylePluginBase
Base class for views style plugins.

Namespace

Drupal\views\Plugin\views\style

Code

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