function AccessResult::cacheUntilEntityChanges
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.0 and is removed from drupal:9.0.0. Use ::addCacheableDependency() instead.
File
-
core/
lib/ Drupal/ Core/ Access/ AccessResult.php, line 292
Class
- AccessResult
- Value object for passing an access result with cacheability metadata.
Namespace
Drupal\Core\AccessCode
public function cacheUntilEntityChanges(EntityInterface $entity) {
@trigger_error(__METHOD__ . ' is deprecated in drupal:8.0.0 and is removed in drupal:9.0.0. Use \\Drupal\\Core\\Access\\AccessResult::addCacheableDependency() instead.', E_USER_DEPRECATED);
return $this->addCacheableDependency($entity);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.