You are here

function _search_api_saved_searches_create_name in Search API Saved Searches 7

Helper function for creating a name for a saved search with the given query.

2 calls to _search_api_saved_searches_create_name()
search_api_saved_searches_save_form in ./search_api_saved_searches.module
Form builder for creating a new saved search.
search_api_saved_searches_save_form_submit in ./search_api_saved_searches.module
Form validation handler for search_api_saved_searches_save_form().

File

./search_api_saved_searches.module, line 1114
Offers the ability to save searches and be notified of new results.

Code

function _search_api_saved_searches_create_name(array $query) {
  if (!empty($query['original_keys']) && is_scalar($query['original_keys'])) {
    $ret[] = $query['original_keys'];
  }
  $name = isset($ret) ? implode(' / ', $ret) : t('Saved search');
  drupal_alter('search_api_saved_search_create_name', $name, $query);
  return $name;
}