You are here

public function DefaultStubCleanup::onStubsCleanup in Acquia Content Hub 8.2

By default, we delete all stubs.

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/DefaultStubCleanup.php, line 37

Class

DefaultStubCleanup
Cleans up default stubs after import.

Namespace

Drupal\acquia_contenthub\EventSubscriber\CleanupStubs

Code

public function onStubsCleanup(CleanUpStubsEvent $event) {
  if (!$event
    ->getStack()
    ->hasDependency($event
    ->getEntity()
    ->uuid())) {
    $event
      ->deleteStub();
  }
}