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::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::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::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::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::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::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::cachePerUser

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

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::andIf

public AccessResult::andIf(AccessResultInterface $other) Combine this access result with another using AND. When AND-ing two access results, the result is: isForbidden() in either ⇒ isForbidden() otherwise, if isAllowed() in both ⇒ isAllowed() otherwise, one of them is isNeutral() ⇒ isNeutral() Truth table: |A N F --+----- A |A N F N |N N F F |F F F Parameters \Drupal\Core\Access\AccessResultInterface $other: The other access result to AND this one with. Return value static Overrides Acc