public function SemanticViewsStyle::tokenizeValue in Semantic Views 8.2
Take a value and apply token replacement logic to it.
Overrides StylePluginBase::tokenizeValue
File
- src/
Plugin/ views/ style/ SemanticViewsStyle.php, line 210
Class
- SemanticViewsStyle
- Style plugin to render each item in a slideshow.
Namespace
Drupal\semanticviews\Plugin\views\styleCode
public function tokenizeValue($value, $row_index) {
if (!isset($this->view->build_info['substitutions']) || !is_array($this->view->build_info['substitutions'])) {
// Set an array.
$this->view->build_info['substitutions'] = [];
}
// Add row_index token.
$this->view->build_info['substitutions']['{{ row_index }}'] = $row_index;
return parent::tokenizeValue($value, $row_index);
}