You are here

public function InlineBlockEntityOperations::handleEntityDelete in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::handleEntityDelete()

Handles entity tracking on deleting a parent entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The parent entity.

File

core/modules/layout_builder/src/InlineBlockEntityOperations.php, line 142

Class

InlineBlockEntityOperations
Defines a class for reacting to entity events related to Inline Blocks.

Namespace

Drupal\layout_builder

Code

public function handleEntityDelete(EntityInterface $entity) {

  // @todo In https://www.drupal.org/node/3008943 call
  //   \Drupal\layout_builder\LayoutEntityHelperTrait::isLayoutCompatibleEntity().
  $this->usage
    ->removeByLayoutEntity($entity);
}