You are here

public function AccessResult::cacheUntilConfigurationChanges in Drupal 8

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.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Access\AccessResult::addCacheableDependency() instead.

File

core/lib/Drupal/Core/Access/AccessResult.php, line 308

Class

AccessResult
Value object for passing an access result with cacheability metadata.

Namespace

Drupal\Core\Access

Code

public function cacheUntilConfigurationChanges(ConfigBase $configuration) {
  @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($configuration);
}