function InlineBlockEntityOperations::handleEntityDelete

Same name in other branches
  1. 9 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::handleEntityDelete()
  2. 10 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::handleEntityDelete()
  3. 11.x 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 156

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.