// \Drupal\layout_builder\LayoutEntityHelperTrait::isLayoutCompatibleEntity().
$this->usage->
removeByLayoutEntity($entity);
} /**
* Handles saving a parent entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The parent entity.
*/
public function handlePreSave(EntityInterface
$entity) { if (!
$this->
isLayoutCompatibleEntity($entity)) { return;
} $duplicate_blocks = FALSE;
if ($sections =
$this->
getEntitySections($entity)) { if ($this->
originalEntityUsesDefaultStorage($entity)) { // This is a new override from a default and the blocks need to be
// duplicated.
$duplicate_blocks = TRUE;
} // Since multiple parent entity revisions may reference common block