You are here

function search_api_page_delete in Search API Pages 7

Deletes a search page.

Parameters

$id: The ID of the search page to delete.

Return value

TRUE on success, FALSE on failure.

1 call to search_api_page_delete()
search_api_page_search_api_index_delete in ./search_api_page.module
Implements hook_search_api_index_delete().

File

./search_api_page.module, line 481
Generate search pages using Search API indexes.

Code

function search_api_page_delete($id) {
  $page = search_api_page_load($id, TRUE);
  if (!$page) {
    return FALSE;
  }
  $page
    ->delete();
  menu_rebuild();
  return TRUE;
}