function InlineBlockUsage::removeByLayoutEntity
Same name in other branches
- 9 core/modules/layout_builder/src/InlineBlockUsage.php \Drupal\layout_builder\InlineBlockUsage::removeByLayoutEntity()
- 8.9.x core/modules/layout_builder/src/InlineBlockUsage.php \Drupal\layout_builder\InlineBlockUsage::removeByLayoutEntity()
- 10 core/modules/layout_builder/src/InlineBlockUsage.php \Drupal\layout_builder\InlineBlockUsage::removeByLayoutEntity()
File
-
core/
modules/ layout_builder/ src/ InlineBlockUsage.php, line 56
Class
- InlineBlockUsage
- Service class to track inline block usage.
Namespace
Drupal\layout_builderCode
public function removeByLayoutEntity(EntityInterface $entity) {
$query = $this->database
->update('inline_block_usage')
->fields([
'layout_entity_type' => NULL,
'layout_entity_id' => NULL,
]);
$query->condition('layout_entity_type', $entity->getEntityTypeId());
$query->condition('layout_entity_id', $entity->id());
$query->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.