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

Breadcrumb

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

function InlineBlock::blockAccess

Overrides BlockPluginTrait::blockAccess

File

core/modules/layout_builder/src/Plugin/Block/InlineBlock.php, line 207

Class

InlineBlock
Defines an inline block plugin type.

Namespace

Drupal\layout_builder\Plugin\Block

Code

protected function blockAccess(AccountInterface $account) {
    if ($entity = $this->getEntity()) {
        return $entity->access('view', $account, TRUE);
    }
    return AccessResult::forbidden();
}

API Navigation

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