You are here

public function ConfigurationSubscriber::onConfigDelete in Facets 8

Reacts to a config delete event to clear the required caches.

Parameters

\Drupal\Core\Config\ConfigCrudEvent $event: The config delete event.

File

src/EventSubscriber/ConfigurationSubscriber.php, line 38

Class

ConfigurationSubscriber
Config subscriber for facet delete.

Namespace

Drupal\facets\EventSubscriber

Code

public function onConfigDelete(ConfigCrudEvent $event) {
  $config = $event
    ->getConfig();
  if (strpos($config
    ->getName(), 'facets') !== FALSE) {
    $this->blockManager
      ->clearCachedDefinitions();
  }
}