interface ConfigurableLanguageManagerInterface

Same name in other branches
  1. 9 core/modules/language/src/ConfigurableLanguageManagerInterface.php \Drupal\language\ConfigurableLanguageManagerInterface
  2. 8.9.x core/modules/language/src/ConfigurableLanguageManagerInterface.php \Drupal\language\ConfigurableLanguageManagerInterface
  3. 11.x core/modules/language/src/ConfigurableLanguageManagerInterface.php \Drupal\language\ConfigurableLanguageManagerInterface

Common interface for language negotiation services.

Hierarchy

Expanded class hierarchy of ConfigurableLanguageManagerInterface

All classes that implement ConfigurableLanguageManagerInterface

15 files declare their use of ConfigurableLanguageManagerInterface
AccountForm.php in core/modules/user/src/AccountForm.php
ConfigTranslationDeleteForm.php in core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php
ConfigTranslationFormBase.php in core/modules/config_translation/src/Form/ConfigTranslationFormBase.php
ConfigurableLanguage.php in core/modules/language/src/Entity/ConfigurableLanguage.php
ImportForm.php in core/modules/locale/src/Form/ImportForm.php

... See full list

File

core/modules/language/src/ConfigurableLanguageManagerInterface.php, line 11

Namespace

Drupal\language
View source
interface ConfigurableLanguageManagerInterface extends LanguageManagerInterface {
    
    /**
     * Rebuild the container to register services needed on multilingual sites.
     */
    public static function rebuildServices();
    
    /**
     * Returns the language negotiator.
     *
     * @return \Drupal\language\LanguageNegotiatorInterface
     *   The language negotiator.
     */
    public function getNegotiator();
    
    /**
     * Injects the language negotiator.
     *
     * @param \Drupal\language\LanguageNegotiatorInterface $negotiator
     *   The language negotiator.
     */
    public function setNegotiator(LanguageNegotiatorInterface $negotiator);
    
    /**
     * Returns all the defined language types including fixed ones.
     *
     * A language type maybe configurable or fixed. A fixed language type is a
     * type whose language negotiation methods are module-defined and not altered
     * through the user interface.
     *
     * @return array
     *   An array of language type machine names.
     */
    public function getDefinedLanguageTypes();
    
    /**
     * Stores language types configuration.
     *
     * @param array $config
     *   An indexed array with the following keys_
     *   - configurable: an array of configurable language type names.
     *   - all: an array of all the defined language type names.
     */
    public function saveLanguageTypesConfiguration(array $config);
    
    /**
     * Updates locked system language weights.
     */
    public function updateLockedLanguageWeights();
    
    /**
     * Gets a language config override object.
     *
     * @param string $langcode
     *   The language code for the override.
     * @param string $name
     *   The language configuration object name.
     *
     * @return \Drupal\language\Config\LanguageConfigOverride
     *   The language config override object.
     */
    public function getLanguageConfigOverride($langcode, $name);
    
    /**
     * Gets a language configuration override storage object.
     *
     * @param string $langcode
     *   The language code for the override.
     *
     * @return \Drupal\Core\Config\StorageInterface
     *   A storage object to use for reading and writing the
     *   configuration override.
     */
    public function getLanguageConfigOverrideStorage($langcode);
    
    /**
     * Returns the standard language list excluding already configured languages.
     *
     * @return array
     *   A list of standard language names keyed by langcode.
     */
    public function getStandardLanguageListWithoutConfigured();
    
    /**
     * Gets the negotiated language method ID.
     *
     * @param string $type
     *   (optional) The language type; e.g., the interface or the content
     *   language.
     *
     * @return string|null
     *   The negotiated language method ID.
     */
    public function getNegotiatedLanguageMethod($type = LanguageInterface::TYPE_INTERFACE);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ConfigurableLanguageManagerInterface::getDefinedLanguageTypes public function Returns all the defined language types including fixed ones. 1
ConfigurableLanguageManagerInterface::getLanguageConfigOverride public function Gets a language config override object. 1
ConfigurableLanguageManagerInterface::getLanguageConfigOverrideStorage public function Gets a language configuration override storage object. 1
ConfigurableLanguageManagerInterface::getNegotiatedLanguageMethod public function Gets the negotiated language method ID. 1
ConfigurableLanguageManagerInterface::getNegotiator public function Returns the language negotiator. 1
ConfigurableLanguageManagerInterface::getStandardLanguageListWithoutConfigured public function Returns the standard language list excluding already configured languages. 1
ConfigurableLanguageManagerInterface::rebuildServices public static function Rebuild the container to register services needed on multilingual sites. 1
ConfigurableLanguageManagerInterface::saveLanguageTypesConfiguration public function Stores language types configuration. 1
ConfigurableLanguageManagerInterface::setNegotiator public function Injects the language negotiator. 1
ConfigurableLanguageManagerInterface::updateLockedLanguageWeights public function Updates locked system language weights. 1

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