diff --git a/core/modules/system/language.api.php b/core/modules/system/language.api.php index fb165a4..24e4d0f 100644 --- a/core/modules/system/language.api.php +++ b/core/modules/system/language.api.php @@ -191,7 +191,7 @@ function hook_language_fallback_candidates_alter(array &$fallback_candidates) { * // Use the current default interface language. * $langcode = language(\Drupal\Core\Language\Language::TYPE_INTERFACE)->langcode; * // Instantiate the transliteration class. - * $trans = drupal_container()->get('transliteration'); + * $trans = Drupal::service('transliteration'); * // Use this to transliterate some text. * $transformed = $trans->transliterate($string, $langcode); * @endcode diff --git a/core/modules/system/lib/Drupal/system/Plugin/PluginUIBase.php b/core/modules/system/lib/Drupal/system/Plugin/PluginUIBase.php index dd890fd..a51c3c1 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/PluginUIBase.php +++ b/core/modules/system/lib/Drupal/system/Plugin/PluginUIBase.php @@ -27,7 +27,7 @@ public function form($form, &$form_state) { $manager = new $plugin_definition['manager'](); } else { - $manager = drupal_container()->get($plugin_definition['manager']); + $manager = Drupal::service($plugin_definition['manager']); } $plugins = $manager->getDefinitions(); diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php index 0a457a6..8ed1ea1 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php @@ -7,6 +7,7 @@ namespace Drupal\system\Tests\Common; +use Drupal; use Drupal\simpletest\WebTestBase; /** @@ -200,7 +201,7 @@ function testHeaderSetting() { $this->drupalGet('common-test/query-string'); $this->assertPattern('@