diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 08f2a04..61c2934 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -2558,8 +2558,8 @@ function menu_router_rebuild() { function menu_router_build($save = FALSE) { // Ensure that all configuration used to build the menu items are loaded // without overrides. - $old_state = $this->configFactory->getOverrideState(); - $this->configFactory->setOverrideState(FALSE); + $old_state = \Drupal::configFactory()->getOverrideState(); + \Drupal::configFactory()->setOverrideState(FALSE); // We need to manually call each module so that we can know which module // a given item came from. $callbacks = array(); @@ -2574,7 +2574,7 @@ function menu_router_build($save = FALSE) { } // Alter the menu as defined in modules, keys are like user/%user. drupal_alter('menu', $callbacks); - $this->configFactory->setOverrideState($old_state); + \Drupal::configFactory()->setOverrideState($old_state); foreach ($callbacks as $path => $router_item) { // If the menu item is a default local task and incorrectly references a // route, remove it. diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigLanguageOverride.php b/core/modules/config/lib/Drupal/config/Tests/ConfigLanguageOverride.php index dac0944..206a8ec 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigLanguageOverride.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigLanguageOverride.php @@ -69,10 +69,10 @@ function testConfigLanguageOverride() { $config = \Drupal::config('config_test.new'); $this->assertTrue($config->isNew(), 'The configuration object config_test.new is new'); $this->assertIdentical($config->get('language'), 'override'); - $this->configFactory->setOverrideState(FALSE); + \Drupal::configFactory()->setOverrideState(FALSE); $config = \Drupal::config('config_test.new'); $this->assertIdentical($config->get('language'), NULL); - $this->configFactory->setOverrideState(TRUE); + \Drupal::configFactory()->setOverrideState(TRUE); // Ensure that language configuration overrides can not be overridden. global $conf; diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigModuleOverridesTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigModuleOverridesTest.php index b17c914..fb147ff 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigModuleOverridesTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigModuleOverridesTest.php @@ -40,12 +40,12 @@ public function testSimpleModuleOverrides() { $this->assertTrue($config_factory->getOverrideState(), 'By default ConfigFactory has overrides enabled.'); - $this->configFactory->setOverrideState(FALSE); + $config_factory->setOverrideState(FALSE); $this->assertFalse($config_factory->getOverrideState(), 'ConfigFactory can disable overrides.'); $this->assertEqual($non_overridden_name, $config_factory->get('system.site')->get('name')); $this->assertEqual($non_overridden_slogan, $config_factory->get('system.site')->get('slogan')); - $this->configFactory->setOverrideState(TRUE); + $config_factory->setOverrideState(TRUE); $this->assertTrue($config_factory->getOverrideState(), 'ConfigFactory can enable overrides.'); $this->assertEqual($overridden_name, $config_factory->get('system.site')->get('name')); $this->assertEqual($overridden_slogan, $config_factory->get('system.site')->get('slogan'));