Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. InlineBlockUsage.php

function InlineBlockUsage::addUsage

File

core/modules/layout_builder/src/InlineBlockUsage.php, line 33

Class

InlineBlockUsage
Service class to track inline block usage.

Namespace

Drupal\layout_builder

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal