You are here

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

Return the token replaced row class for the specified row.

File

lib/Drupal/views/Plugin/views/style/StylePluginBase.php, line 177
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 get_row_class($row_index) {
  if ($this
    ->usesRowClass()) {
    $class = $this->options['row_class'];
    if ($this
      ->usesFields() && $this->view->field) {
      $class = strip_tags($this
        ->tokenize_value($class, $row_index));
    }
    $classes = explode(' ', $class);
    foreach ($classes as &$class) {
      $class = drupal_clean_css_identifier($class);
    }
    return implode(' ', $classes);
  }
}