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
LazyContextRepositoryTest::testGetRuntimeMultipleContextsPerService function core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php @covers ::getRuntimeContexts
LocalActionDefault::getCacheContexts function core/lib/Drupal/Core/Menu/LocalActionDefault.php The cache contexts associated with this object.
LocalTaskDefault::getCacheContexts function core/lib/Drupal/Core/Menu/LocalTaskDefault.php The cache contexts associated with this object.
LoginLogoutMenuLink::getCacheContexts function core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php The cache contexts associated with this object.
MediaCacheTagsTest::getAdditionalCacheContextsForEntity function core/modules/media/tests/src/Functional/MediaCacheTagsTest.php Returns the additional (non-standard) cache contexts for the tested entity.
MediaLibraryState::getCacheContexts function core/modules/media_library/src/MediaLibraryState.php The cache contexts associated with this object.
MediaResourceTestBase::getExpectedCacheContexts function core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
MediaTranslationUITest::$defaultCacheContexts property core/modules/media/tests/src/Functional/MediaTranslationUITest.php Default cache contexts expected on a non-translated entity.
MenuLinkBase::getCacheContexts function core/lib/Drupal/Core/Menu/MenuLinkBase.php The cache contexts associated with this object.
MenuLinkContentResourceTestBase::getExpectedCacheContexts function core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.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 Default cache contexts expected on a non-translated entity.
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.
NavigationMenuBlock::getCacheContexts function core/modules/navigation/src/Plugin/Block/NavigationMenuBlock.php
NavigationSectionStorage::deriveContextsFromRoute function core/modules/navigation/src/Plugin/SectionStorage/NavigationSectionStorage.php Derives the available plugin contexts from route values.
NavigationSectionStorage::getContextsDuringPreview function core/modules/navigation/src/Plugin/SectionStorage/NavigationSectionStorage.php Gets contexts for use during preview.
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.
NodeListBuilderTest::testCacheContexts function core/modules/node/tests/src/Kernel/NodeListBuilderTest.php Tests that the correct cache contexts are set.
NodeResourceTestBase::getExpectedCacheContexts function core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
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 Default cache contexts expected on a non-translated entity.
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.
Permission::getCacheContexts function core/modules/user/src/Plugin/views/access/Permission.php The cache contexts associated with this object.
PlaceholderGenerator::$cacheContextsManager property core/lib/Drupal/Core/Render/PlaceholderGenerator.php The cache contexts manager service.
PlaceholderGeneratorTest::testRenderPlaceholdersDifferentSortedContextsTags function core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php Tests the creation of an element with a #lazy_builder callback.
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.
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::$cacheContextsManager property core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
RequestPath::getCacheContexts function core/modules/system/src/Plugin/Condition/RequestPath.php

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