Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Context.php

function Context::addCacheableDependency

Overrides ContextInterface::addCacheableDependency

1 call to Context::addCacheableDependency()
Context::setContextValue in core/lib/Drupal/Core/Plugin/Context/Context.php
Sets the context value.

File

core/lib/Drupal/Core/Plugin/Context/Context.php, line 145

Class

Context
A Drupal specific context wrapper class.

Namespace

Drupal\Core\Plugin\Context

Code

public function addCacheableDependency($dependency) {
    $this->cacheabilityMetadata = $this->cacheabilityMetadata
        ->merge(CacheableMetadata::createFromObject($dependency));
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal