1 views_plugin_style.inc | views_plugin_style::get_row_class($row_index) |
Return the token replaced row class for the specified row.
File
- core/
modules/ views/ plugins/ views_plugin_style.inc, line 122 - Definition of views_plugin_style.
Class
- views_plugin_style
- Base class to define a style plugin handler.
Code
function get_row_class($row_index) {
if ($this->uses_row_class() && $this->options['row_class']) {
$has_tokens = FALSE;
if ($this->uses_fields() && $this->view->field) {
$has_tokens = TRUE;
}
$classes = explode(' ', $this->options['row_class']);
foreach ($classes as &$class) {
if ($has_tokens) {
$class = _views_tokenized_clean_css_identifier($class, $this, $row_index);
}
else {
// No tokens, all valid CSS characters allowed.
$class = backdrop_clean_css_identifier($class, array());
}
}
return implode(' ', $classes);
}
}