diff --git a/core/modules/locale/locale.services.yml b/core/modules/locale/locale.services.yml index 09dd9f5..1d55460 100644 --- a/core/modules/locale/locale.services.yml +++ b/core/modules/locale/locale.services.yml @@ -7,7 +7,7 @@ services: class: Drupal\locale\LocaleConfigManager arguments: ['@config.storage', '@locale.storage', '@config.factory', '@config.typed', '@language_manager', '@locale.default.config.storage'] calls: - - [setConfigManager, ['@config.manager']] + - [_setConfigManager, ['@config.manager']] locale.storage: class: Drupal\locale\StringDatabaseStorage arguments: ['@database'] diff --git a/core/modules/locale/src/LocaleConfigManager.php b/core/modules/locale/src/LocaleConfigManager.php index 56d70fc..c57e8cc 100644 --- a/core/modules/locale/src/LocaleConfigManager.php +++ b/core/modules/locale/src/LocaleConfigManager.php @@ -100,8 +100,11 @@ class LocaleConfigManager { * The configuration manager. * * @var \Drupal\Core\Config\ConfigManagerInterface + * + * @internal + * Will be renamed to $configManager in 8.1.0. */ - protected $configManager; + protected $_configManager; /** * Creates a new typed configuration manager. @@ -136,8 +139,8 @@ public function __construct(StorageInterface $config_storage, StringStorageInter * @internal * Will be replaced by constructor injection in 8.1.0. */ - public function setConfigManager(ConfigManagerInterface $config_manager) { - $this->configManager = $config_manager; + public function _setConfigManager(ConfigManagerInterface $config_manager) { + $this->_configManager = $config_manager; } /** @@ -149,11 +152,11 @@ public function setConfigManager(ConfigManagerInterface $config_manager) { * @internal * Will be replaced by constructor injection in 8.1.0. */ - protected function getConfigManager() { - if (isset($this->configManager)) { - return $this->configManager; + protected function _getConfigManager() { + if (!isset($this->_configManager)) { + $this->_configManager = \Drupal::service('config.manager'); } - return \Drupal::service('config.manager'); + return $this->_configManager; } /** @@ -518,7 +521,7 @@ public function getDefaultConfigLangcode($name) { // configurable_language entities are a special case since they can be // translated regardless of whether they are shipped if they in the standard // language list. - $config_entity_type = $this->getConfigManager()->getEntityTypeIdByName($name); + $config_entity_type = $this->_getConfigManager()->getEntityTypeIdByName($name); if (!$config_entity_type || $config_entity_type === 'configurable_language' || !empty($this->configFactory->get($name)->get('_core.default_config_hash')) ) {