function FieldPluginBase::elementWrapperClasses

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::elementWrapperClasses()
  2. 8.9.x core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::elementWrapperClasses()
  3. 10 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::elementWrapperClasses()

Overrides FieldHandlerInterface::elementWrapperClasses

File

core/modules/views/src/Plugin/views/field/FieldPluginBase.php, line 415

Class

FieldPluginBase
Base class for views fields.

Namespace

Drupal\views\Plugin\views\field

Code

public function elementWrapperClasses($row_index = NULL) {
    $classes = $this->tokenizeValue($this->options['element_wrapper_class'], $row_index);
    $classes = explode(' ', $classes);
    foreach ($classes as &$class) {
        $class = Html::cleanCssIdentifier($class);
    }
    return implode(' ', $classes);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.