NodeAddAccessCheck::access

public NodeAddAccessCheck::access(AccountInterface $account, NodeTypeInterface $node_type = NULL) Checks access to the node add page for the node type. Parameters \Drupal\Core\Session\AccountInterface $account: The currently logged in account. \Drupal\node\NodeTypeInterface $node_type: (optional) The node type. If not specified, access is allowed if there exists at least one node type for which the user may create a node. Return value string A \Drupal\Core\Access\AccessInterface constant valu

NodeAddAccessCheck::$entityManager

The entity manager. Type: \Drupal\Core\Entity\EntityManagerInterface File core/modules/node/src/Access/NodeAddAccessCheck.php, line 23 Class NodeAddAccessCheck Determines access to for node add pages. Namespace Drupal\node\Access Code protected $entityManager;

NodeAddAccessCheck

Determines access to for node add pages. Hierarchy class \Drupal\node\Access\NodeAddAccessCheck implements AccessInterface Related topics Node access rights The node access system determines who can do what to which nodes. File core/modules/node/src/Access/NodeAddAccessCheck.php, line 16 Namespace Drupal\node\Access Members Name Modifiers Type Description NodeAddAccessCheck::$entityManager protected property The entity manager. NodeAddAccessCheck::access public f

NodeAccessGrantsCacheContext::getLabel

public static NodeAccessGrantsCacheContext::getLabel() Returns the label of the cache context. Return value string The label of the cache context. Overrides CalculatedCacheContextInterface::getLabel See also Cache File core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php, line 26 Class NodeAccessGrantsCacheContext Defines the node access view cache context service. Namespace Drupal\node\Cache Code public static function getLabel() { return t("Content access view grants"); }

NodeAccessGrantsCacheContext::getContext

public NodeAccessGrantsCacheContext::getContext($operation = NULL) Returns the string representation of the cache context. A cache context service's name is used as a token (placeholder) cache key, and is then replaced with the string returned by this method. Parameters string|null $parameter: The parameter, or NULL to indicate all possible parameter values. Return value string The string representation of the cache context. When $parameter is NULL, a value representing all possible parameter

NodeAccessGrantsCacheContext::getCacheableMetadata

public NodeAccessGrantsCacheContext::getCacheableMetadata($operation = NULL) Gets the cacheability metadata for the context based on the parameter value. There are three valid cases for the returned CacheableMetadata object: An empty object means this can be optimized away safely. A max-age of 0 means that this context can never be optimized away. It will never bubble up and cache tags will not be used. Any non-zero max-age and cache tags will bubble up into the cache item if this is optimized

NodeAccessGrantsCacheContext::checkNodeGrants

protected NodeAccessGrantsCacheContext::checkNodeGrants($operation) Checks the node grants for the given operation. Parameters string $operation: The operation to check the node grants for. Return value string The string representation of the cache context. File core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php, line 63 Class NodeAccessGrantsCacheContext Defines the node access view cache context service. Namespace Drupal\node\Cache Code protected function checkNodeGrants(

NodeAccessGrantsCacheContext

Defines the node access view cache context service. Cache context ID: 'user.node_grants' (to vary by all operations' grants). Calculated cache context ID: 'user.node_grants:%operation', e.g. 'user.node_grants:view' (to vary by the view operation's grants). This allows for node access grants-sensitive caching when listing nodes. Hierarchy class \Drupal\Core\Cache\Context\UserCacheContextBaseclass \Drupal\node\Cache\NodeAccessGrantsCacheContext implements CalculatedCacheContextInterface See a

NodeAccessControlHandlerInterface::writeGrants

public NodeAccessControlHandlerInterface::writeGrants(NodeInterface $node, $delete = TRUE) Writes a list of grants to the database, deleting any previously saved ones. Modules that use node access can use this function when doing mass updates due to widespread permission changes. Note: Don't call this function directly from a contributed module. Call \Drupal\node\NodeAccessControlHandlerInterface::acquireGrants() instead. Parameters \Drupal\node\NodeInterface $node: The node whose grants are b

NodeAccessControlHandlerInterface::writeDefaultGrant

public NodeAccessControlHandlerInterface::writeDefaultGrant() Creates the default node access grant entry on the grant storage. File core/modules/node/src/NodeAccessControlHandlerInterface.php, line 55 Class NodeAccessControlHandlerInterface Node specific entity access control methods. Namespace Drupal\node Code public function writeDefaultGrant();