You are here

public function ConfigSubscriber::deleteUnusedFlows in CMS Content Sync 2.0.x

Same name and namespace in other branches
  1. 2.1.x src/EventSubscriber/ConfigSubscriber.php \Drupal\cms_content_sync\EventSubscriber\ConfigSubscriber::deleteUnusedFlows()

Delete unsed remote flows after config deletion.

Parameters

\Drupal\Core\Config\ConfigCrudEvent $event: The Event to process

File

src/EventSubscriber/ConfigSubscriber.php, line 48

Class

ConfigSubscriber
A subscriber triggering a config when certain configuration changes.

Namespace

Drupal\cms_content_sync\EventSubscriber

Code

public function deleteUnusedFlows(ConfigCrudEvent $event) {
  if (str_contains($event
    ->getConfig()
    ->getName(), 'cms_content_sync.flow')) {
    Flow::resetFlowCache();
    SyncCoreFlowExport::deleteUnusedFlows();
  }
}