function SearchPageRepository::isSearchActive
Same name in other branches
- 9 core/modules/search/src/SearchPageRepository.php \Drupal\search\SearchPageRepository::isSearchActive()
- 10 core/modules/search/src/SearchPageRepository.php \Drupal\search\SearchPageRepository::isSearchActive()
- 11.x core/modules/search/src/SearchPageRepository.php \Drupal\search\SearchPageRepository::isSearchActive()
Overrides SearchPageRepositoryInterface::isSearchActive
File
-
core/
modules/ search/ src/ SearchPageRepository.php, line 53
Class
- SearchPageRepository
- Provides a repository for Search Page config entities.
Namespace
Drupal\searchCode
public function isSearchActive() {
return (bool) $this->getQuery()
->condition('status', TRUE)
->range(0, 1)
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.