NodeAccessControlHandler::createAccess

public NodeAccessControlHandler::createAccess($entity_bundle = NULL, AccountInterface $account = NULL, array $context = array(), $return_as_object = FALSE) Checks access to create an entity. Parameters string $entity_bundle: (optional) The bundle of the entity. Required if the entity supports bundles, defaults to NULL otherwise. \Drupal\Core\Session\AccountInterface $account: (optional) The user session for which to check access, or NULL to check access for the current user. Defaults to NULL.

NodeAccessControlHandler::countGrants

public NodeAccessControlHandler::countGrants() Counts available node grants. Return value int Returns the amount of node grants. Overrides NodeAccessControlHandlerInterface::countGrants File core/modules/node/src/NodeAccessControlHandler.php, line 184 Class NodeAccessControlHandler Defines the access control handler for the node entity type. Namespace Drupal\node Code public function countGrants() { return $this->grantStorage->count(); }

NodeAccessControlHandler::checkFieldAccess

protected NodeAccessControlHandler::checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) Default field access as determined by this access control handler. Parameters string $operation: The operation access should be checked for. Usually one of "view" or "edit". \Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition. \Drupal\Core\Session\AccountInterface $account: The user session

NodeAccessControlHandler::checkCreateAccess

protected NodeAccessControlHandler::checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) Performs create access checks. This method is supposed to be overwritten by extending classes that do their own custom access checking. Parameters \Drupal\Core\Session\AccountInterface $account: The user for which to check access. array $context: An array of key-value pairs to pass additional context when needed. string|null $entity_bundle: (optional) The bundle of the entity

NodeAccessControlHandler::checkAllGrants

public NodeAccessControlHandler::checkAllGrants(AccountInterface $account) Checks all grants for a given account. Parameters \Drupal\Core\Session\AccountInterface $account: A user object representing the user for whom the operation is to be performed. Return value int. Status of the access check. Overrides NodeAccessControlHandlerInterface::checkAllGrants File core/modules/node/src/NodeAccessControlHandler.php, line 191 Class NodeAccessControlHandler Defines the access control handler fo

NodeAccessControlHandler::checkAccess

protected NodeAccessControlHandler::checkAccess(EntityInterface $node, $operation, AccountInterface $account) Performs access checks. This method is supposed to be overwritten by extending classes that do their own custom access checking. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for which to check access. string $operation: The entity operation. Usually one of 'view', 'view label', 'update' or 'delete'. \Drupal\Core\Session\AccountInterface $account: The user for whic

NodeAccessControlHandler::acquireGrants

public NodeAccessControlHandler::acquireGrants(NodeInterface $node) Gets the list of node access grants. This function is called to check the access grants for a node. It collects all node access grants for the node from hook_node_access_records() implementations, allows these grants to be altered via hook_node_access_records_alter() implementations, and returns the grants to the caller. Parameters \Drupal\node\NodeInterface $node: The $node to acquire grants for. Return value array $grants T

NodeAccessControlHandler::access

public NodeAccessControlHandler::access(EntityInterface $entity, $operation, AccountInterface $account = NULL, $return_as_object = FALSE) Checks access to an operation on a given entity or entity translation. Use \Drupal\Core\Entity\EntityAccessControlHandlerInterface::createAccess() to check access to create an entity. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for which to check access. string $operation: The operation access should be checked for. Usually one of "vie

NodeAccessControlHandler::$grantStorage

The node grant storage. Type: \Drupal\node\NodeGrantDatabaseStorageInterface File core/modules/node/src/NodeAccessControlHandler.php, line 28 Class NodeAccessControlHandler Defines the access control handler for the node entity type. Namespace Drupal\node Code protected $grantStorage;

NodeAccessControlHandler

Defines the access control handler for the node entity type. Hierarchy class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityAccessControlHandler implements EntityAccessControlHandlerInterfaceclass \Drupal\node\NodeAccessControlHandler implements EntityHandlerInterface, NodeAccessControlHandlerInterface See also \Drupal\node\Entity\Node Related topics Node access rights The node access system determines who can