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