You are here

public function SearchPage::isDefaultSearch in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/search/src/Entity/SearchPage.php \Drupal\search\Entity\SearchPage::isDefaultSearch()

Determines if this search page entity is currently the default search.

Return value

bool TRUE if this search page entity is the default search, FALSE otherwise.

Overrides SearchPageInterface::isDefaultSearch

1 call to SearchPage::isDefaultSearch()
SearchPage::postCreate in core/modules/search/src/Entity/SearchPage.php
Acts on a created entity before hooks are invoked.

File

core/modules/search/src/Entity/SearchPage.php, line 159

Class

SearchPage
Defines a configured search page.

Namespace

Drupal\search\Entity

Code

public function isDefaultSearch() {
  return $this
    ->searchPageRepository()
    ->getDefaultSearchPage() == $this
    ->id();
}