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

Breadcrumb

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

function SetInlineBlockDependency::onGetDependency

Handles the BlockContentEvents::INLINE_BLOCK_GET_DEPENDENCY event.

Parameters

\Drupal\block_content\Event\BlockContentGetDependencyEvent $event: The event.

File

core/modules/layout_builder/src/EventSubscriber/SetInlineBlockDependency.php, line 94

Class

SetInlineBlockDependency
An event subscriber that returns an access dependency for inline blocks.

Namespace

Drupal\layout_builder\EventSubscriber

Code

public function onGetDependency(BlockContentGetDependencyEvent $event) {
    if ($dependency = $this->getInlineBlockDependency($event->getBlockContentEntity())) {
        $event->setAccessDependency($dependency);
    }
}

API Navigation

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