AccessResult::getCacheTags

public AccessResult::getCacheTags() The cache tags associated with this object. When this object is modified, these cache tags will be invalidated. Return value string[] A set of cache tags. Overrides RefinableCacheableDependencyTrait::getCacheTags File core/lib/Drupal/Core/Access/AccessResult.php, line 190 Class AccessResult Value object for passing an access result with cacheability metadata. Namespace Drupal\Core\Access Code public function getCacheTags() { return $this->cache

AccessResult::getCacheContexts

public AccessResult::getCacheContexts() The cache contexts associated with this object. These identify a specific variation/representation of the object. Cache contexts are tokens: placeholders that are converted to cache keys by the @cache_contexts_manager service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache. Return value string[] An array of cache context tokens, used to generate a cache ID.

AccessResult::cacheUntilEntityChanges

public AccessResult::cacheUntilEntityChanges(EntityInterface $entity) Convenience method, adds the entity's cache tag. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity whose cache tag to set on the access result. Return value $this Deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use ::addCacheableDependency() instead. File core/lib/Drupal/Core/Access/AccessResult.php, line 265 Class AccessResult Value object for passing an access result with cach

AccessResult::forbidden

public static AccessResult::forbidden($reason = NULL) Creates an AccessResultInterface object with isForbidden() === TRUE. Parameters string|null $reason: (optional) The reason why access is forbidden. Intended for developers, hence not translatable. Return value \Drupal\Core\Access\AccessResult isForbidden() will be TRUE. File core/lib/Drupal/Core/Access/AccessResult.php, line 61 Class AccessResult Value object for passing an access result with cacheability metadata. Namespace Drupal

AccessResult::forbiddenIf

public static AccessResult::forbiddenIf($condition) Creates a forbidden or neutral access result. Parameters bool $condition: The condition to evaluate. Return value \Drupal\Core\Access\AccessResult If $condition is TRUE, isForbidden() will be TRUE, otherwise isNeutral() will be TRUE. File core/lib/Drupal/Core/Access/AccessResult.php, line 90 Class AccessResult Value object for passing an access result with cacheability metadata. Namespace Drupal\Core\Access Code public static functi

AccessResult::cacheUntilConfigurationChanges

public AccessResult::cacheUntilConfigurationChanges(ConfigBase $configuration) Convenience method, adds the configuration object's cache tag. Parameters \Drupal\Core\Config\ConfigBase $configuration: The configuration object whose cache tag to set on the access result. Return value $this Deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use ::addCacheableDependency() instead. File core/lib/Drupal/Core/Access/AccessResult.php, line 280 Class AccessResult Value object

AccessResult::getCacheMaxAge

public AccessResult::getCacheMaxAge() The maximum age for which this object may be cached. Return value int The maximum time in seconds that this object may be cached. Overrides RefinableCacheableDependencyTrait::getCacheMaxAge File core/lib/Drupal/Core/Access/AccessResult.php, line 197 Class AccessResult Value object for passing an access result with cacheability metadata. Namespace Drupal\Core\Access Code public function getCacheMaxAge() { return $this->cacheMaxAge; }

AccessResult::cachePerPermissions

public AccessResult::cachePerPermissions() Convenience method, adds the "user.permissions" cache context. Return value $this File core/lib/Drupal/Core/Access/AccessResult.php, line 239 Class AccessResult Value object for passing an access result with cacheability metadata. Namespace Drupal\Core\Access Code public function cachePerPermissions() { $this->addCacheContexts(array('user.permissions')); return $this; }

AccessResult::allowedIf

public static AccessResult::allowedIf($condition) Creates an allowed or neutral access result. Parameters bool $condition: The condition to evaluate. Return value \Drupal\Core\Access\AccessResult If $condition is TRUE, isAllowed() will be TRUE, otherwise isNeutral() will be TRUE. File core/lib/Drupal/Core/Access/AccessResult.php, line 76 Class AccessResult Value object for passing an access result with cacheability metadata. Namespace Drupal\Core\Access Code public static function al

AccessResult::allowedIfHasPermission

public static AccessResult::allowedIfHasPermission(AccountInterface $account, $permission) Creates an allowed access result if the permission is present, neutral otherwise. Checks the permission and adds a 'user.permissions' cache context. Parameters \Drupal\Core\Session\AccountInterface $account: The account for which to check a permission. string $permission: The permission to check for. Return value \Drupal\Core\Access\AccessResult If the account has the permission, isAllowed() will be TRU