function SarniaViewsHandlerField::document_self_tokens in Sarnia 7
Re-title tokens from Sarnia field handlers with their Solr property names.
Overrides views_handler_field::document_self_tokens
File
- handlers/
handler_field.inc, line 292
Class
- SarniaViewsHandlerField
- Field handler for displaying Solr fields in Views.
Code
function document_self_tokens(&$tokens) {
foreach ($this->view->display_handler
->get_handlers('field') as $field => $handler) {
if ($handler instanceof SarniaViewsHandlerField) {
$token_name = "[{$field}]";
if (isset($tokens[$token_name]) && isset($handler->options['solr_property'])) {
$tokens[$token_name] = $handler
->admin_summary();
}
}
}
}