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

Breadcrumb

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

function BlockContentAccessControlHandler::checkCreateAccess

Overrides EntityAccessControlHandler::checkCreateAccess

File

core/modules/block_content/src/BlockContentAccessControlHandler.php, line 107

Class

BlockContentAccessControlHandler
Defines the access control handler for the content block entity type.

Namespace

Drupal\block_content

Code

protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
    return AccessResult::allowedIfHasPermissions($account, [
        'create ' . $entity_bundle . ' block content',
        'administer block content',
    ], 'OR');
}

API Navigation

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