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
LocalActionDefault::getCacheContexts function core/lib/Drupal/Core/Menu/LocalActionDefault.php
LocalTaskDefault::getCacheContexts function core/lib/Drupal/Core/Menu/LocalTaskDefault.php
LoginLogoutMenuLink::getCacheContexts function core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php
MediaCacheTagsTest::getAdditionalCacheContextsForEntity function core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
MediaLibraryState::getCacheContexts function core/modules/media_library/src/MediaLibraryState.php
MediaResourceTestBase::getExpectedCacheContexts function core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
MediaTranslationUITest::$defaultCacheContexts property core/modules/media/tests/src/Functional/MediaTranslationUITest.php
MenuLinkBase::getCacheContexts function core/lib/Drupal/Core/Menu/MenuLinkBase.php
MenuLinkContentResourceTestBase::getExpectedCacheContexts function core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php
MenuLinkContentTranslationUITest::$defaultCacheContexts property core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php
MenuLinkMock::getCacheContexts function core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php
MenuResourceTestBase::getExpectedCacheContexts function core/modules/system/tests/src/Functional/Rest/MenuResourceTestBase.php
ModerationStateFilter::getCacheContexts function core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php
MultipleStaticContext::getAvailableContexts function core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php
MultipleStaticContext::getRuntimeContexts function core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php
NavigationMenuBlock::getCacheContexts function core/modules/navigation/src/Plugin/Block/NavigationMenuBlock.php
NavigationSectionStorage::deriveContextsFromRoute function core/modules/navigation/src/Plugin/SectionStorage/NavigationSectionStorage.php
NavigationSectionStorage::getContextsDuringPreview function core/modules/navigation/src/Plugin/SectionStorage/NavigationSectionStorage.php
Node::getCacheContexts function core/modules/node/src/Plugin/views/argument_default/Node.php
NodeCacheTagsTest::getAdditionalCacheContextsForEntity function core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
NodeCacheTagsTest::getAdditionalCacheContextsForEntityListing function core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
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
NodeRouteContext::getAvailableContexts function core/modules/node/src/ContextProvider/NodeRouteContext.php
NodeRouteContext::getRuntimeContexts function core/modules/node/src/ContextProvider/NodeRouteContext.php
NodeTranslationUITest::$defaultCacheContexts property core/modules/node/tests/src/Functional/NodeTranslationUITest.php
OverridesSectionStorage::deriveContextsFromRoute function core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php
OverridesSectionStorage::getContextsDuringPreview function core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php
OverridesSectionStorageTest::testDeriveContextsFromRoute function core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php @covers ::deriveContextsFromRoute[[api-linebreak]]
OverridesSectionStorageTest::testGetContexts function core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php @covers ::getContexts[[api-linebreak]]
OverridesSectionStorageTest::testGetContextsDuringPreview function core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php @covers ::getContextsDuringPreview[[api-linebreak]]
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
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
QueryPluginBase::getCacheContexts function core/modules/views/src/Plugin/views/query/QueryPluginBase.php
Raw::getCacheContexts function core/modules/views/src/Plugin/views/argument_default/Raw.php
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
RendererBase::getCacheContexts function core/modules/views/src/Entity/Render/RendererBase.php
RendererTestBase::$cacheContextsManager property core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
RequestPath::getCacheContexts function core/modules/system/src/Plugin/Condition/RequestPath.php
ResourceTestBase::getExpectedCacheContexts function core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.

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