function ChainResponsePolicy::addPolicy
Add a policy to the list of policy rules.
Parameters
\Drupal\Core\PageCache\ResponsePolicyInterface $policy: The request policy rule to add.
Return value
$this
Overrides ChainResponsePolicyInterface::addPolicy
File
- 
              core/
lib/ Drupal/ Core/ ProxyClass/ PageCache/ ChainResponsePolicy.php, line 81  
Class
- ChainResponsePolicy
 - Provides a proxy class for \Drupal\Core\PageCache\ChainResponsePolicy.
 
Namespace
Drupal\Core\ProxyClass\PageCacheCode
public function addPolicy(\Drupal\Core\PageCache\ResponsePolicyInterface $policy) {
  return $this->lazyLoadItself()
    ->addPolicy($policy);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.