Search for contexts

  1. Search 7.x for contexts
  2. Search 8.9.x for contexts
  3. Search 10.3.x for contexts
  4. Search 11.x for contexts
  5. Other projects
Title Object type File name Summary
AccessResult::getCacheContexts function core/lib/Drupal/Core/Access/AccessResult.php The cache contexts associated with this object.
AccessResult::resetCacheContexts function core/lib/Drupal/Core/Access/AccessResult.php Resets cache contexts (to the empty array).
AccessResultTest::$cacheContextsManager property core/tests/Drupal/Tests/Core/Access/AccessResultTest.php The cache contexts manager.
AccessResultTest::testCacheContexts function core/tests/Drupal/Tests/Core/Access/AccessResultTest.php @covers ::addCacheContexts[[api-linebreak]]
@covers ::resetCacheContexts[[api-linebreak]]
@covers ::getCacheContexts[[api-linebreak]]
@covers ::cachePerPermissions[[api-linebreak]]
@covers ::cachePerUser[[api-linebreak]]
@covers…
BaseFieldOverrideResourceTestBase::getExpectedCacheContexts function core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
Cache::mergeContexts function core/lib/Drupal/Core/Cache/Cache.php Merges arrays of cache contexts and removes duplicates.
CacheableDependencyInterface::getCacheContexts function core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php The cache contexts associated with this object.
CacheableDependencyTrait::$cacheContexts property core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php Cache contexts.
CacheableDependencyTrait::getCacheContexts function core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php
CacheableMetadata::getCacheContexts function core/lib/Drupal/Core/Cache/CacheableMetadata.php The cache contexts associated with this object.
CacheableMetadata::setCacheContexts function core/lib/Drupal/Core/Cache/CacheableMetadata.php Sets cache contexts.
CacheContextsManager class core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Converts cache context tokens into cache keys.
CacheContextsManager.php file core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
CacheContextsManager::$container property core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php The service container.
CacheContextsManager::$contexts property core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Available cache context IDs and corresponding labels.
CacheContextsManager::$validContextTokens property core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php The set of valid context tokens.
CacheContextsManager::assertValidTokens function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Asserts the context tokens are valid.
CacheContextsManager::convertTokensToKeys function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Converts cache context tokens to cache keys.
CacheContextsManager::getAll function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Provides an array of available cache contexts.
CacheContextsManager::getLabels function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Provides an array of available cache context labels.
CacheContextsManager::getService function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Retrieves a cache context service from the container.
CacheContextsManager::optimizeTokens function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Optimizes cache context tokens (the minimal representative subset).
CacheContextsManager::parseTokens function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Parses cache context tokens into context IDs and optional parameters.
CacheContextsManager::validateTokens function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Validates an array of cache context tokens.
CacheContextsManager::__construct function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Constructs a CacheContextsManager object.
CacheContextsManagerTest class core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @coversDefaultClass \Drupal\Core\Cache\Context\CacheContextsManager[[api-linebreak]]
@group Cache
CacheContextsManagerTest.php file core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php Contains \Drupal\Tests\Core\Cache\Context\CacheContextsManagerTest.
CacheContextsManagerTest::getContextsFixture function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php
CacheContextsManagerTest::getMockContainer function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php
CacheContextsManagerTest::providerTestInvalidCalculatedContext function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php Provides a list of invalid 'baz' cache contexts: the parameter is missing.
CacheContextsManagerTest::providerTestOptimizeTokens function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php Provides a list of context token sets.
CacheContextsManagerTest::testAvailableContextLabels function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php
CacheContextsManagerTest::testAvailableContextStrings function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php
CacheContextsManagerTest::testConvertTokensToKeys function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @covers ::convertTokensToKeys[[api-linebreak]]
CacheContextsManagerTest::testInvalidCalculatedContext function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @covers ::convertTokensToKeys[[api-linebreak]]
CacheContextsManagerTest::testInvalidContext function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @covers ::convertTokensToKeys[[api-linebreak]]
CacheContextsManagerTest::testOptimizeTokens function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @covers ::optimizeTokens[[api-linebreak]]
CacheContextsManagerTest::testValidateContexts function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @covers ::validateTokens[[api-linebreak]]
CacheContextsManagerTest::validateTokensProvider function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php Provides a list of cache context token arrays.
CacheContextsPass class core/lib/Drupal/Core/Cache/Context/CacheContextsPass.php Adds cache_contexts parameter to the container.
CacheContextsPass.php file core/lib/Drupal/Core/Cache/Context/CacheContextsPass.php
CacheContextsPass::process function core/lib/Drupal/Core/Cache/Context/CacheContextsPass.php Implements CompilerPassInterface::process().
CacheTest::mergeCacheContextsProvide function core/tests/Drupal/Tests/Core/Cache/CacheTest.php Provides a list of pairs of cache contexts arrays to be merged.
CacheTest::testMergeCacheContexts function core/tests/Drupal/Tests/Core/Cache/CacheTest.php @covers ::mergeContexts[[api-linebreak]]
cache_contexts_manager service core/core.services.yml Drupal\Core\Cache\Context\CacheContextsManager
ConditionPluginCollection::$conditionContexts property core/lib/Drupal/Core/Condition/ConditionPluginCollection.php An array of collected contexts for conditions.
ConditionPluginCollection::getConditionContexts function core/lib/Drupal/Core/Condition/ConditionPluginCollection.php Gets the values for all defined contexts.
ConfigBase::getCacheContexts function core/lib/Drupal/Core/Config/ConfigBase.php The cache contexts associated with this object.
Context::getCacheContexts function core/lib/Drupal/Core/Plugin/Context/Context.php The cache contexts associated with this object.
ContextAwarePluginBase::getContexts function core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php Gets the defined contexts.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.