function SearchPage::postDelete

Same name in other branches
  1. 9 core/modules/search/src/Entity/SearchPage.php \Drupal\search\Entity\SearchPage::postDelete()
  2. 8.9.x core/modules/search/src/Entity/SearchPage.php \Drupal\search\Entity\SearchPage::postDelete()
  3. 10 core/modules/search/src/Entity/SearchPage.php \Drupal\search\Entity\SearchPage::postDelete()

Overrides EntityBase::postDelete

File

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

Class

SearchPage
Defines a configured search page.

Namespace

Drupal\search\Entity

Code

public static function postDelete(EntityStorageInterface $storage, array $entities) {
    parent::postDelete($storage, $entities);
    $search_page_repository = \Drupal::service('search.search_page_repository');
    if (!$search_page_repository->isSearchActive()) {
        $search_page_repository->clearDefaultSearchPage();
    }
}

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