You are here

interface ConfigurableLanguageManagerInterface in Drupal 8

Same name and namespace in other branches
  1. 9 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

13 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
   *   The negotiated language method ID.
   */
  public function getNegotiatedLanguageMethod($type = LanguageInterface::TYPE_INTERFACE);

}

Members

Namesort descending Modifiers Type Description 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
LanguageManagerInterface::getConfigOverrideLanguage public function Gets the current configuration override language. 1
LanguageManagerInterface::getCurrentLanguage public function Returns the current language for the given type. 1
LanguageManagerInterface::getDefaultLanguage public function Returns a language object representing the site's default language. 1
LanguageManagerInterface::getDefaultLockedLanguages public function Returns a list of the default locked languages. 1
LanguageManagerInterface::getDefinedLanguageTypesInfo public function Returns information about all defined language types. 1
LanguageManagerInterface::getFallbackCandidates public function Returns the language fallback candidates for a given context. 1
LanguageManagerInterface::getLanguage public function Returns a language object from the given language code. 1
LanguageManagerInterface::getLanguageName public function Produced the printed name for a language for display. 1
LanguageManagerInterface::getLanguages public function Returns a list of languages set up on the site. 1
LanguageManagerInterface::getLanguageSwitchLinks public function Returns the language switch links for the given language type. 1
LanguageManagerInterface::getLanguageTypes public function Returns an array of the available language types. 1
LanguageManagerInterface::getNativeLanguages public function Returns a list of languages set up on the site in their native form. 1
LanguageManagerInterface::getStandardLanguageList public static function Some common languages with their English and native names. 1
LanguageManagerInterface::isLanguageLocked public function Checks whether a language is locked. 1
LanguageManagerInterface::isMultilingual public function Returns whether or not the site has more than one language added. 1
LanguageManagerInterface::reset public function Resets the given language type or all types if none specified. 1
LanguageManagerInterface::setConfigOverrideLanguage public function Sets the configuration override language. 1