Verified Commit fdfa9821 authored by Alex Pott's avatar Alex Pott
Browse files

docs: #3422895 Document when...

docs: #3422895 Document when ConfigurableLanguageManagerInterface::getLanguageConfigOverride() and LanguageConfigFactoryOverrideInterface::getOverride() return an empty object

By: jackwrfuller
By: joachim
By: smustgrave
By: charlliequadros
By: shubham_pareek_19
By: nexusnovaz
By: rodrigoaguilera
By: xjm
By: skifdesu
By: murz
By: brandonlira
By: quietone
(cherry picked from commit 92634791)
parent 603a9982
Loading
Loading
Loading
Loading
Loading
+12 −5
Changes for core/modules/language/src/Config/LanguageConfigFactoryOverrideInterface.php: 12 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -29,15 +29,22 @@ public function getLanguage();
  public function setLanguage(?LanguageInterface $language = NULL);

  /**
   * Get language override for given language and configuration name.
   * Gets the language override for a language and configuration name.
   *
   * An empty object is returned when there is no override data for the given
   * language code and configuration object. This includes cases where:
   * - The configuration has no override for that language.
   * - The given language is not installed or does not exist.
   * - The configuration name is not an existing configuration object.
   *
   * @param string $langcode
   *   Language code.
   *   The language code for the override.
   * @param string $name
   *   Configuration name.
   *   The name of the configuration object.
   *
   * @return \Drupal\Core\Config\Config
   *   Configuration override object.
   * @return \Drupal\language\Config\LanguageConfigOverride
   *   The language config override object for the requested language and
   *   configuration object.
   */
  public function getOverride($langcode, $name);

+9 −2
Changes for core/modules/language/src/ConfigurableLanguageManagerInterface.php: 9 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -61,13 +61,20 @@ public function updateLockedLanguageWeights();
  /**
   * Gets a language config override object.
   *
   * An empty object is returned when there is no override data for the given
   * language code and configuration object. This includes cases where:
   * - The configuration has no override for that language.
   * - The given language is not installed or does not exist.
   * - The configuration name is not an existing configuration object.
   *
   * @param string $langcode
   *   The language code for the override.
   * @param string $name
   *   The language configuration object name.
   *   The name of the configuration object.
   *
   * @return \Drupal\language\Config\LanguageConfigOverride
   *   The language config override object.
   *   The language config override object for the requested language and
   *   configuration object.
   */
  public function getLanguageConfigOverride($langcode, $name);