function SearchPageRepository::clearDefaultSearchPage

Same name in other branches
  1. 9 core/modules/search/src/SearchPageRepository.php \Drupal\search\SearchPageRepository::clearDefaultSearchPage()
  2. 8.9.x core/modules/search/src/SearchPageRepository.php \Drupal\search\SearchPageRepository::clearDefaultSearchPage()
  3. 11.x core/modules/search/src/SearchPageRepository.php \Drupal\search\SearchPageRepository::clearDefaultSearchPage()

File

core/modules/search/src/SearchPageRepository.php, line 91

Class

SearchPageRepository
Provides a repository for Search Page config entities.

Namespace

Drupal\search

Code

public function clearDefaultSearchPage() {
    $this->configFactory
        ->getEditable('search.settings')
        ->clear('default_page')
        ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.