LanguagesCacheContext::getCacheableMetadata

public LanguagesCacheContext::getCacheableMetadata($type = NULL) Gets the cacheability metadata for the context based on the parameter value. There are three valid cases for the returned CacheableMetadata object: An empty object means this can be optimized away safely. A max-age of 0 means that this context can never be optimized away. It will never bubble up and cache tags will not be used. Any non-zero max-age and cache tags will bubble up into the cache item if this is optimized away to allo

LanguagesCacheContext::$languageManager

The language manager. File core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php, line 18 Class LanguagesCacheContext Defines the LanguagesCacheContext service, for "per language" caching. Namespace Drupal\Core\Cache\Context Code protected $languageManager;

LanguagesCacheContext

Defines the LanguagesCacheContext service, for "per language" caching. Hierarchy class \Drupal\Core\Cache\Context\LanguagesCacheContext implements CalculatedCacheContextInterface File core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php, line 11 Namespace Drupal\Core\Cache\Context Members Name Modifiers Type Description LanguagesCacheContext::$languageManager protected property The language manager. LanguagesCacheContext::getCacheableMetadata public functio

LanguageNegotiatorInterface::updateConfiguration

LanguageNegotiatorInterface::updateConfiguration(array $types) Updates the configuration based on the given language types. Stores the list of the language types along with information about their configurable state. Stores the default settings if the language type is not configurable. Parameters string[] $types: An array of configurable language types. File core/modules/language/src/LanguageNegotiatorInterface.php, line 207 Class LanguageNegotiatorInterface Common interface for language

LanguageNegotiatorInterface::setCurrentUser

public LanguageNegotiatorInterface::setCurrentUser(AccountInterface $current_user) Sets the current active user and resets all language types. Parameters \Drupal\Core\Session\AccountInterface $current_user: The current active user. File core/modules/language/src/LanguageNegotiatorInterface.php, line 118 Class LanguageNegotiatorInterface Common interface for language negotiation services. Namespace Drupal\language Code public function setCurrentUser(AccountInterface $current_user);

LanguageNegotiatorInterface::saveConfiguration

LanguageNegotiatorInterface::saveConfiguration($type, $enabled_methods) Saves a list of language negotiation methods for a language type. Parameters string $type: The language type. int[] $enabled_methods: An array of language negotiation method weights keyed by method ID. File core/modules/language/src/LanguageNegotiatorInterface.php, line 190 Class LanguageNegotiatorInterface Common interface for language negotiation services. Namespace Drupal\language Code function saveConfiguratio

LanguageNegotiatorInterface::reset

public LanguageNegotiatorInterface::reset() Resets the negotiated languages and the method instances. File core/modules/language/src/LanguageNegotiatorInterface.php, line 110 Class LanguageNegotiatorInterface Common interface for language negotiation services. Namespace Drupal\language Code public function reset();

LanguageNegotiatorInterface::purgeConfiguration

LanguageNegotiatorInterface::purgeConfiguration() Resave the configuration to purge missing negotiation methods. File core/modules/language/src/LanguageNegotiatorInterface.php, line 195 Class LanguageNegotiatorInterface Common interface for language negotiation services. Namespace Drupal\language Code function purgeConfiguration();

LanguageNegotiatorInterface::METHOD_ID

The language negotiation method id for the language negotiator itself. File core/modules/language/src/LanguageNegotiatorInterface.php, line 105 Class LanguageNegotiatorInterface Common interface for language negotiation services. Namespace Drupal\language Code const METHOD_ID = 'language-default';

LanguageNegotiatorInterface::isNegotiationMethodEnabled

public LanguageNegotiatorInterface::isNegotiationMethodEnabled($method_id, $type = NULL) Checks whether a language negotiation method is enabled for a language type. Parameters string $method_id: The language negotiation method ID. string $type: (optional) The language type. If none is passed, all the configurable language types will be inspected. Return value bool TRUE if the method is enabled for at least one of the given language types, or FALSE otherwise. File core/modules/language/src/La