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

Breadcrumb

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

function TermAccessControlHandler::checkCreateAccess

Overrides EntityAccessControlHandler::checkCreateAccess

File

core/modules/taxonomy/src/TermAccessControlHandler.php, line 77

Class

TermAccessControlHandler
Defines the access control handler for the taxonomy term entity type.

Namespace

Drupal\taxonomy

Code

protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
    return AccessResult::allowedIfHasPermissions($account, [
        "create terms in {$entity_bundle}",
        'administer taxonomy',
    ], 'OR');
}

API Navigation

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