Defines a common interface for entity access controller classes.
Expanded class hierarchy of EntityAccessControllerInterface
All classes that implement EntityAccessControllerInterface
interface EntityAccessControllerInterface {
/**
* Checks access to an operation on a given entity or entity translation.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity for which to check access.
* @param string $operation
* The operation access should be checked for.
* Usually one of "view", "create", "update" or "delete".
* @param string $langcode
* (optional) The language code for which to check access. Defaults to
* Language::LANGCODE_DEFAULT.
* @param \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.
*
* @return bool
* TRUE if access was granted, FALSE otherwise.
*/
public function access(EntityInterface $entity, $operation, $langcode = Language::LANGCODE_DEFAULT, AccountInterface $account = NULL);
/**
* Clears all cached access checks.
*/
public function resetCache();
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityAccessControllerInterface:: |
public | function | Checks access to an operation on a given entity or entity translation. | 1 |
EntityAccessControllerInterface:: |
public | function | Clears all cached access checks. | 1 |