function views_plugin_style::tokenize_value
Take a value and apply token replacement logic to it.
2 calls to views_plugin_style::tokenize_value()
- views_plugin_style::get_row_class in plugins/
views_plugin_style.inc - Return the token replaced row class for the specified row.
- views_plugin_style_rss::get_description in plugins/
views_plugin_style_rss.inc - Get RSS feed description.
File
-
plugins/
views_plugin_style.inc, line 158
Class
- views_plugin_style
- Base class to define a style plugin handler.
Code
public function tokenize_value($value, $row_index) {
if (!isset($value)) {
$value = '';
}
if (strpos($value, '[') !== FALSE || strpos($value, '!') !== FALSE || strpos($value, '%') !== FALSE) {
// Row tokens might be empty, for example for node row style.
$tokens = isset($this->row_tokens[$row_index]) ? $this->row_tokens[$row_index] : array();
if (!empty($this->view->build_info['substitutions'])) {
$tokens += $this->view->build_info['substitutions'];
}
if ($tokens) {
$value = strtr($value, $tokens);
}
}
return $value;
}