RefinableCacheableDependencyTrait

Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Hierarchy trait \Drupal\Core\Cache\RefinableCacheableDependencyTrait File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 8 Namespace Drupal\Core\Cache Members Name Modifiers Type Description RefinableCacheableDependencyTrait::$cacheContexts protected property Cache contexts. RefinableCacheableDependencyTrait::$cacheMaxAge protected property Cache max-age. RefinableCachea

RefinableCacheableDependencyInterface::mergeCacheMaxAge

public RefinableCacheableDependencyInterface::mergeCacheMaxAge($max_age) Merges the maximum age (in seconds) with the existing maximum age. The max age will be set to the given value if it is lower than the existing value. Parameters int $max_age: The max age to associate. Return value $this Throws \InvalidArgumentException Thrown if a non-integer value is supplied. File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyInterface.php, line 49 Class RefinableCacheableDependencyInterf

RefinableCacheableDependencyInterface::addCacheTags

public RefinableCacheableDependencyInterface::addCacheTags(array $cache_tags) Adds cache tags. Parameters string[] $cache_tags: The cache tags to be added. Return value $this File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyInterface.php, line 33 Class RefinableCacheableDependencyInterface Allows to add cacheability metadata to an object for the current runtime. Namespace Drupal\Core\Cache Code public function addCacheTags(array $cache_tags);

RefinableCacheableDependencyInterface::addCacheContexts

public RefinableCacheableDependencyInterface::addCacheContexts(array $cache_contexts) Adds cache contexts. Parameters string[] $cache_contexts: The cache contexts to be added. Return value $this File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyInterface.php, line 23 Class RefinableCacheableDependencyInterface Allows to add cacheability metadata to an object for the current runtime. Namespace Drupal\Core\Cache Code public function addCacheContexts(array $cache_contexts);

RefinableCacheableDependencyInterface::addCacheableDependency

public RefinableCacheableDependencyInterface::addCacheableDependency($other_object) Adds a dependency on an object: merges its cacheability metadata. Parameters \Drupal\Core\Cache\CacheableDependencyInterface|object $other_object: The dependency. If the object implements CacheableDependencyInterface, then its cacheability metadata will be used. Otherwise, the passed in object must be assumed to be uncacheable, so max-age 0 is set. Return value $this See also \Drupal\Core\Cache\CacheableMetad

RefinableCacheableDependencyInterface

Allows to add cacheability metadata to an object for the current runtime. This must be used when changing an object in a way that affects its cacheability. For example, when changing the active translation of an entity based on the current content language then a cache context for that must be added. Hierarchy interface \Drupal\Core\Cache\CacheableDependencyInterfaceinterface \Drupal\Core\Cache\RefinableCacheableDependencyInterface File core/lib/Drupal/Core/Cache/RefinableCacheableDependenc

RedirectResponseSubscriber::__construct

public RedirectResponseSubscriber::__construct(UnroutedUrlAssemblerInterface $url_assembler, RequestContext $request_context) Constructs a RedirectResponseSubscriber object. Parameters \Drupal\Core\Utility\UnroutedUrlAssemblerInterface $url_assembler: The unrouted URL assembler service. \Drupal\Core\Routing\RequestContext $request_context: The request context. File core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php, line 37 Class RedirectResponseSubscriber Allows manipula

RedirectResponseSubscriber::sanitizeDestination

public RedirectResponseSubscriber::sanitizeDestination(GetResponseEvent $event) Sanitize the destination parameter to prevent open redirect attacks. Parameters \Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The Event to process. File core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php, line 138 Class RedirectResponseSubscriber Allows manipulation of the response object when performing a redirect. Namespace Drupal\Core\EventSubscriber Code public function

RedirectResponseSubscriber::getSubscribedEvents

static RedirectResponseSubscriber::getSubscribedEvents() Registers the methods in this class that should be listeners. Return value array An array of event listener definitions. Overrides EventSubscriberInterface::getSubscribedEvents File core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php, line 168 Class RedirectResponseSubscriber Allows manipulation of the response object when performing a redirect. Namespace Drupal\Core\EventSubscriber Code static function getSubscr

RedirectResponseSubscriber::getDestinationAsAbsoluteUrl

protected RedirectResponseSubscriber::getDestinationAsAbsoluteUrl($destination, $scheme_and_host) Converts the passed in destination into an absolute URL. Parameters string $destination: The path for the destination. In case it starts with a slash it should have the base path included already. string $scheme_and_host: The scheme and host string of the current request. Return value string The destination as absolute URL. File core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php,