public function SearchApiSavedSearchesViewsHandlerFieldName::render_text in Search API Saved Searches 7
Perform an advanced text render for the item.
This is separated out as some fields may render lists, and this allows each item to be handled individually.
Overrides views_handler_field::render_text
File
- views/
handler_field_saved_search_name.inc, line 43 - Contains the SearchApiSavedSearchesViewsHandlerFieldName class.
Class
- SearchApiSavedSearchesViewsHandlerFieldName
- Views field handler for displaying a saved search's name, optionally linked to the search page.
Code
public function render_text($alter) {
if ($this->options['link_to_page'] && $this->currentSearchId) {
$search = search_api_saved_search_load($this->currentSearchId);
if ($search && search_api_saved_search_edit_access(NULL, $search) && !empty($search->options['page'])) {
$alter['make_link'] = TRUE;
$page = $search->options['page'] + array(
'path' => NULL,
'query' => array(),
);
$alter['path'] = $page['path'];
$alter['query'] = $page['query'];
}
}
return parent::render_text($alter);
}