You are here

public function ContentModerationStateStubCleanup::onStubsCleanup in Acquia Content Hub 8.2

By default, we delete all stubs. Moderation is dynamic, so don't delete it.

Parameters

\Drupal\acquia_contenthub\Event\CleanUpStubsEvent $event: The cleanup stubs $event.

See also

\Drupal\acquia_contenthub\EventSubscriber\CleanupStubs\DefaultStubCleanup

\Drupal\acquia_contenthub\StubTracker::cleanUp

File

src/EventSubscriber/CleanupStubs/ContentModerationStateStubCleanup.php, line 37

Class

ContentModerationStateStubCleanup
Cleans up Content moderation state stubs after import.

Namespace

Drupal\acquia_contenthub\EventSubscriber\CleanupStubs

Code

public function onStubsCleanup(CleanUpStubsEvent $event) {
  if ($event
    ->getEntity()
    ->getEntityTypeId() === 'content_moderation_state') {
    $event
      ->stopPropagation();
  }
}