You are here

public function SearchApiSavedSearch::settings in Search API Saved Searches 7

Return value

SearchApiSavedSearchesSettings The settings this saved search uses.

Throws

SearchApiException If the settings don't exist.

1 call to SearchApiSavedSearch::settings()
SearchApiSavedSearch::save in ./search_api_saved_searches.search_entity.inc
Permanently saves the entity.

File

./search_api_saved_searches.search_entity.inc, line 159
Contains the entity class for saved searches.

Class

SearchApiSavedSearch
Class representing "Saved searches" settings.

Code

public function settings() {
  if (!isset($this->settings)) {
    $this->settings = search_api_saved_searches_settings_load($this->settings_id);
  }
  if (!$this->settings) {
    throw new SearchApiException(t("The saved search settings with the ID %id don't exist, but are used by an existing saved search.", array(
      '%id' => $this->settings_id,
    )));
  }
  return $this->settings;
}