Search for contexts

  1. Search 7.x for contexts
  2. Search 9.5.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
MediaCacheTagsTest::getAdditionalCacheContextsForEntity function core/modules/media/tests/src/Functional/MediaCacheTagsTest.php Returns the additional (non-standard) cache contexts for the tested entity.
MediaTranslationUITest::$defaultCacheContexts property core/modules/media/tests/src/Functional/MediaTranslationUITest.php {inheritdoc}
MenuLinkBase::getCacheContexts function core/lib/Drupal/Core/Menu/MenuLinkBase.php The cache contexts associated with this object.
MenuLinkContentHalJsonAnonTest::getExpectedCacheContexts function core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonAnonTest.php The expected cache contexts for the GET/HEAD response of the test entity.
MenuLinkContentTranslationUITest::$defaultCacheContexts property core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php {inheritdoc}
MenuLinkMock::getCacheContexts function core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php The cache contexts associated with this object.
MenuResourceTestBase::getExpectedCacheContexts function core/modules/system/tests/src/Functional/Rest/MenuResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
ModerationStateFilter::getCacheContexts function core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php The cache contexts associated with this object.
MultipleStaticContext::getAvailableContexts function core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php Gets all available contexts for the purposes of configuration.
MultipleStaticContext::getRuntimeContexts function core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php Gets runtime context values for the given context IDs.
Node::getCacheContexts function core/modules/node/src/Plugin/views/argument_default/Node.php The cache contexts associated with this object.
NodeCacheTagsTest::getAdditionalCacheContextsForEntity function core/modules/node/tests/src/Functional/NodeCacheTagsTest.php Returns the additional (non-standard) cache contexts for the tested entity.
NodeCacheTagsTest::getAdditionalCacheContextsForEntityListing function core/modules/node/tests/src/Functional/NodeCacheTagsTest.php Returns the additional cache tags for the tested entity's listing by type.
NodeCacheTagsTest::getDefaultCacheContexts function core/modules/node/tests/src/Functional/NodeCacheTagsTest.php Gets the default cache contexts for rendered entities.
NodeListBuilderTest::testCacheContexts function core/modules/node/tests/src/Kernel/NodeListBuilderTest.php Tests that the correct cache contexts are set.
NodeRouteContext::getAvailableContexts function core/modules/node/src/ContextProvider/NodeRouteContext.php Gets all available contexts for the purposes of configuration.
NodeRouteContext::getRuntimeContexts function core/modules/node/src/ContextProvider/NodeRouteContext.php Gets runtime context values for the given context IDs.
NodeTranslationUITest::$defaultCacheContexts property core/modules/node/tests/src/Functional/NodeTranslationUITest.php {inheritdoc}
OverridesSectionStorage::deriveContextsFromRoute function core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php Derives the available plugin contexts from route values.
OverridesSectionStorage::getContextsDuringPreview function core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php Gets contexts for use during preview.
OverridesSectionStorageTest::testDeriveContextsFromRoute function core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php @covers ::deriveContextsFromRoute
OverridesSectionStorageTest::testGetContexts function core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php @covers ::getContexts
OverridesSectionStorageTest::testGetContextsDuringPreview function core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php @covers ::getContextsDuringPreview
PageDisplayVariantSelectionEvent::$contexts property core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php An array of collected contexts to pass to the page display variant.
PageDisplayVariantSelectionEvent::getContexts function core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php Gets the contexts that were set during event dispatch.
PageDisplayVariantSelectionEvent::setContexts function core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php Sets the contexts to be passed to the page display variant.
PathAliasHalJsonTestBase::getExpectedCacheContexts function core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
PathAliasResourceTestBase::getExpectedCacheContexts function core/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
Permission::getCacheContexts function core/modules/user/src/Plugin/views/access/Permission.php The cache contexts associated with this object.
QueryParameter::getCacheContexts function core/modules/views/src/Plugin/views/argument_default/QueryParameter.php The cache contexts associated with this object.
QueryPluginBase::getCacheContexts function core/modules/views/src/Plugin/views/query/QueryPluginBase.php The cache contexts associated with this object.
Raw::getCacheContexts function core/modules/views/src/Plugin/views/argument_default/Raw.php The cache contexts associated with this object.
RdfMappingResourceTestBase::getExpectedCacheContexts function core/modules/rdf/tests/src/Functional/Rest/RdfMappingResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
RefinableCacheableDependencyInterface::addCacheContexts function core/lib/Drupal/Core/Cache/RefinableCacheableDependencyInterface.php Adds cache contexts.
RefinableCacheableDependencyTrait::addCacheContexts function core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php
RenderCache::$cacheContextsManager property core/lib/Drupal/Core/Render/RenderCache.php The cache contexts manager.
RenderCacheIntegrationTest::testBuildRenderableWithCacheContexts function core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php Ensure that the view renderable contains the cache contexts.
RenderCacheTest::doTestUser1WithContexts function core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php Ensures that user 1 has a unique render cache for the given context.
RenderedEntity::getCacheContexts function core/modules/views/src/Plugin/views/field/RenderedEntity.php The cache contexts associated with this object.
RendererBase::getCacheContexts function core/modules/views/src/Entity/Render/RendererBase.php The cache contexts associated with this object.
RendererTestBase::$cacheContexts property core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
RequestPath::getCacheContexts function core/modules/system/src/Plugin/Condition/RequestPath.php The cache contexts associated with this object.
ResourceTestBase::getExpectedCacheContexts function core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
RestResourceConfigResourceTestBase::getExpectedCacheContexts function core/modules/rest/tests/src/Functional/Rest/RestResourceConfigResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
Role::getCacheContexts function core/modules/user/src/Plugin/views/access/Role.php The cache contexts associated with this object.
SectionComponentBuildRenderArrayEvent::$contexts property core/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php The available contexts.
SectionComponentBuildRenderArrayEvent::getContexts function core/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php Get the available contexts.
SectionStorageBase::getContextsDuringPreview function core/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageBase.php Gets contexts for use during preview.
SectionStorageInterface::deriveContextsFromRoute function core/modules/layout_builder/src/SectionStorageInterface.php Derives the available plugin contexts from route values.
SectionStorageInterface::getContextsDuringPreview function core/modules/layout_builder/src/SectionStorageInterface.php Gets contexts for use during preview.

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