Search for contexts

  1. Search 7.x for contexts
  2. Search 9.5.x for contexts
  3. Search 8.9.x for contexts
  4. Search 11.x for contexts
  5. Other projects
Title Object type File name Summary
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
@group Cache
CacheContextsManagerTest.php file core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php
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
CacheContextsManagerTest::testInvalidCalculatedContext function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @covers ::convertTokensToKeys
CacheContextsManagerTest::testInvalidContext function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @covers ::convertTokensToKeys
CacheContextsManagerTest::testOptimizeTokens function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @covers ::optimizeTokens
CacheContextsManagerTest::testValidateContexts function core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @covers ::validateTokens
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
cache_contexts_manager service core/core.services.yml Drupal\Core\Cache\Context\CacheContextsManager
CommentCacheTagsTest::getAdditionalCacheContextsForEntity function core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php Returns the additional (non-standard) cache contexts for the tested entity.
CommentCacheTagsTest::getDefaultCacheContexts function core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php Gets the default cache contexts for rendered entities.
CommentResourceTestBase::getExpectedCacheContexts function core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
CommentTest::getExpectedCacheContexts function core/modules/jsonapi/tests/src/Functional/CommentTest.php The expected cache contexts for the GET/HEAD response of the test entity.
CommentTranslationUITest::$defaultCacheContexts property core/modules/comment/tests/src/Functional/CommentTranslationUITest.php Default cache contexts expected on a non-translated entity.
ComputedString::getCacheContexts function core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php The cache contexts associated with this object.
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.
ConfigurableLanguageResourceTestBase::getExpectedCacheContexts function core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
ConfigurableLanguageTest::getExpectedCacheContexts function core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php The expected cache contexts for the GET/HEAD response of the test entity.
ContentLanguageSettingsResourceTestBase::getExpectedCacheContexts function core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
ContentLanguageSettingsTest::getExpectedCacheContexts function core/modules/jsonapi/tests/src/Functional/ContentLanguageSettingsTest.php The expected cache contexts for the GET/HEAD response of the test entity.
ContentTestTranslationUITest::$defaultCacheContexts property core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php Default cache contexts expected on a non-translated entity.
ContentTranslationManageAccessCheckTest::$cacheContextsManager property core/modules/content_translation/tests/src/Unit/Access/ContentTranslationManageAccessCheckTest.php The cache contexts manager.
ContentTranslationUITestBase::$defaultCacheContexts property core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php Default cache contexts expected on a non-translated entity.
Context::getCacheContexts function core/lib/Drupal/Core/Plugin/Context/Context.php The cache contexts associated with this object.

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