Search for context

  1. Search 7.x for context
  2. Search 9.5.x for context
  3. Search 8.9.x for context
  4. Search 11.x for context
  5. Other projects

Exact matches

These are exact matches according to your search
Title Object type File name Summary
Context class core/lib/Drupal/Core/Plugin/Context/Context.php A Drupal specific context wrapper class.
Context class core/lib/Drupal/Component/Plugin/Context/Context.php A generic context class for wrapping data a plugin needs to operate.

All search results

Title Object type File name Summary
TranslationLanguageRenderer::getCacheContexts function core/modules/views/src/Entity/Render/TranslationLanguageRenderer.php The cache contexts associated with this object.
TwigComponentLoader::getSourceContext function core/modules/sdc/src/Twig/TwigComponentLoader.php
TwigExtension::addAdditionalContext function core/modules/sdc/src/Twig/TwigExtension.php Appends additional context to the template based on the template id.
TwigExtension::mergeAdditionalRenderContext function core/modules/sdc/src/Twig/TwigExtension.php Calculates additional context for this template.
TypedData::setContext function core/lib/Drupal/Core/TypedData/TypedData.php Sets the context of a property or item via a context aware parent.
TypedDataInterface::setContext function core/lib/Drupal/Core/TypedData/TypedDataInterface.php Sets the context of a property or item via a context aware parent.
UncacheableDependencyTrait::getCacheContexts function core/lib/Drupal/Core/Cache/UncacheableDependencyTrait.php
UnchangingCacheableDependencyTrait::getCacheContexts function core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php
UrlCacheContext class core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php Defines the UrlCacheContext service, for "per page" caching.
UrlCacheContext.php file core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php
UrlCacheContext::getCacheableMetadata function core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php Gets the cacheability metadata for the context.
UrlCacheContext::getContext function core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php Returns the string representation of the cache context.
UrlCacheContext::getLabel function core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php Returns the label of the cache context.
UrlGenerator::$context property core/lib/Drupal/Core/Routing/UrlGenerator.php
UrlGenerator::getContext function core/lib/Drupal/Core/Routing/UrlGenerator.php
UrlGenerator::setContext function core/lib/Drupal/Core/Routing/UrlGenerator.php phpcs:ignore Drupal.Commenting.FunctionComment.VoidReturn
UrlGeneratorTest::$context property core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php The request context.
user.current_user_context service core/modules/user/user.services.yml Drupal\user\ContextProvider\CurrentUserContext
user.links.contextual.yml file core/modules/user/user.links.contextual.yml core/modules/user/user.links.contextual.yml
User::getCacheContexts function core/modules/user/src/Plugin/views/argument_default/User.php The cache contexts associated with this object.
UserCacheContext class core/lib/Drupal/Core/Cache/Context/UserCacheContext.php Defines the UserCacheContext service, for "per user" caching.
UserCacheContext.php file core/lib/Drupal/Core/Cache/Context/UserCacheContext.php
UserCacheContext::getCacheableMetadata function core/lib/Drupal/Core/Cache/Context/UserCacheContext.php Gets the cacheability metadata for the context.
UserCacheContext::getContext function core/lib/Drupal/Core/Cache/Context/UserCacheContext.php Returns the string representation of the cache context.
UserCacheContext::getLabel function core/lib/Drupal/Core/Cache/Context/UserCacheContext.php Returns the label of the cache context.
UserCacheContextBase class core/lib/Drupal/Core/Cache/Context/UserCacheContextBase.php Base class for user-based cache contexts.
UserCacheContextBase.php file core/lib/Drupal/Core/Cache/Context/UserCacheContextBase.php
UserCacheContextBase::$user property core/lib/Drupal/Core/Cache/Context/UserCacheContextBase.php The account object.
UserCacheContextBase::__construct function core/lib/Drupal/Core/Cache/Context/UserCacheContextBase.php Constructs a new UserCacheContextBase class.
UserContextAccessPolicy class core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php
UserContextAccessPolicy::applies function core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php Checks whether this access policy applies to a given scope.
UserContextAccessPolicy::getPersistentCacheContexts function core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php Gets the persistent cache contexts.
UserResourceTestBase::getExpectedCacheContexts function core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
UserRole::getCacheContexts function core/modules/user/src/Plugin/Condition/UserRole.php
UserRolesAccessPolicy::getPersistentCacheContexts function core/lib/Drupal/Core/Session/UserRolesAccessPolicy.php Gets the persistent cache contexts.
UserRolesAccessPolicyTest::testGetPersistentCacheContexts function core/tests/Drupal/Tests/Core/Session/UserRolesAccessPolicyTest.php Tests the getPersistentCacheContexts method.
UserRolesCacheContext class core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php Defines the UserRolesCacheContext service, for "per role" caching.
UserRolesCacheContext.php file core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php
UserRolesCacheContext::getCacheableMetadata function core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php Gets the cacheability metadata for the context based on the parameter value.
UserRolesCacheContext::getContext function core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php Returns the string representation of the cache context.
UserRolesCacheContext::getLabel function core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php Returns the label of the cache context.
UserRolesCacheContextTest class core/tests/Drupal/Tests/Core/Cache/Context/UserRolesCacheContextTest.php @coversDefaultClass \Drupal\Core\Cache\Context\UserRolesCacheContext
@group Cache
UserRolesCacheContextTest.php file core/tests/Drupal/Tests/Core/Cache/Context/UserRolesCacheContextTest.php
UserRolesCacheContextTest::testCalculatedRole function core/tests/Drupal/Tests/Core/Cache/Context/UserRolesCacheContextTest.php @covers ::getContext
UserTest::getExpectedCacheContexts function core/modules/jsonapi/tests/src/Functional/UserTest.php The expected cache contexts for the GET/HEAD response of the test entity.
UserTranslationUITest::$defaultCacheContexts property core/modules/user/tests/src/Functional/UserTranslationUITest.php Default cache contexts expected on a non-translated entity.
VariationCacheTest::$cacheContextsManager property core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php The prophesized cache contexts manager.
ViewExecutable::addCacheContext function core/modules/views/src/ViewExecutable.php Expands the list of used cache contexts for the view.
views.view.contextual_recent.yml file core/modules/contextual/tests/modules/contextual_test/config/optional/views.view.contextual_recent.yml core/modules/contextual/tests/modules/contextual_test/config/optional/views.view.contextual_recent.yml
views.view.test_contextual_links.yml file core/modules/node/tests/modules/node_test_views/test_views/views.view.test_contextual_links.yml core/modules/node/tests/modules/node_test_views/test_views/views.view.test_contextual_links.yml

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