2c2 < index cfd8427..d3b8dfb 100644 --- > index 2786774..8f9d8d6 100644 5,14c5 < @@ -95,7 +95,7 @@ function drupal_theme_initialize() { < return; < } < < - $themes = list_themes(); < + $themes = \Drupal::service('theme_handler')->listInfo(); < < // @todo Let the theme.negotiator listen to the kernel request event. < // Determine the active theme for the theme negotiator service. This includes < @@ -727,7 +727,7 @@ function drupal_find_theme_templates($cache, $extension, $path) { --- > @@ -524,7 +524,7 @@ function drupal_find_theme_templates($cache, $extension, $path) { 22a14,35 > @@ -647,7 +647,7 @@ function theme_get_setting($setting_name, $theme = NULL) { > > // Get the values for the theme-specific settings from the .info.yml files > // of the theme and all its base themes. > - $themes = list_themes(); > + $themes = \Drupal::service('theme_handler')->listInfo(); > if ($theme && isset($themes[$theme])) { > $theme_object = $themes[$theme]; > > diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc > index 0a9fb5a..ed049b0 100644 > --- a/core/includes/theme.maintenance.inc > +++ b/core/includes/theme.maintenance.inc > @@ -70,7 +70,7 @@ function _drupal_maintenance_theme() { > $module_handler->load('system'); > } > > - $themes = list_themes(); > + $themes = \Drupal::service('theme_handler')->listInfo(); > > // If no themes are installed yet, or if the requested custom theme is not > // installed, retrieve all available themes. 24c37 < index e84b33b..4a6081a 100644 --- > index 0ad005d..aa3a30d 100644 27,28c40,42 < @@ -166,7 +166,7 @@ protected function init($theme_name = NULL) { < // Instead of the global theme, a specific theme was requested. --- > @@ -170,7 +170,7 @@ protected function init($theme_name = NULL) { > } > // Instead of the active theme, a specific theme was requested. 30d43 < // @see drupal_theme_initialize() 36c49 < @@ -386,7 +386,8 @@ protected function build() { --- > @@ -393,7 +393,8 @@ protected function build() { 46c59,61 < @@ -577,15 +578,6 @@ protected function getPath($module) { --- > @@ -581,14 +582,4 @@ public function destruct() { > protected function getPath($module) { > return drupal_get_path('module', $module); 48,49c63,64 < < /** --- > - > - /** 58,59c73,79 < - /** < * Wraps drupal_theme_initialize(). --- > } > diff --git a/core/lib/Drupal/Core/Theme/ThemeAccessCheck.php b/core/lib/Drupal/Core/Theme/ThemeAccessCheck.php > index 2898034..3f77ce1 100644 > --- a/core/lib/Drupal/Core/Theme/ThemeAccessCheck.php > +++ b/core/lib/Drupal/Core/Theme/ThemeAccessCheck.php > @@ -37,7 +37,7 @@ public function access($theme) { > * TRUE if the theme is enabled, FALSE otherwise. 61c81,86 < protected function initializeTheme() { --- > public function checkAccess($theme) { > - $themes = list_themes(); > + $themes = \Drupal::service('theme_handler')->listInfo(); > return !empty($themes[$theme]->status); > } > 63c88 < index 1bca18b..6abc867 100644 --- > index 0549702..9868b00 100644 66,69c91,94 < @@ -58,7 +58,7 @@ function block_help($path, $arg) { < else { < $demo_theme = \Drupal::config('system.theme')->get('default'); < } --- > @@ -38,7 +38,7 @@ function block_help($route_name, RouteMatchInterface $route_match) { > } > if ($route_name == 'block.admin_display' || $route_name == 'block.admin_display_theme') { > $demo_theme = $route_match->getParameter('theme') ?: \Drupal::config('system.theme')->get('default'); 73c98 < $output .= '

' . l(t('Demonstrate block regions (@theme)', array('@theme' => $themes[$demo_theme]->info['name'])), 'admin/structure/block/demo/' . $demo_theme) . '

'; --- > $output .= '

' . l(t('Demonstrate block regions (!theme)', array('!theme' => $themes[$demo_theme]->info['name'])), 'admin/structure/block/demo/' . $demo_theme) . '

'; 75c100 < @@ -388,7 +388,7 @@ function _block_get_renderable_block($element) { --- > @@ -203,7 +203,7 @@ function block_theme_initialize($theme) { 84,114c109,113 < diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php < index 3ed3842..284d9b3 100644 < --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php < +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php < @@ -90,7 +90,7 @@ public function addForm(CustomBlockTypeInterface $custom_block_type, Request $re < $block = $this->customBlockStorage->create(array( < 'type' => $custom_block_type->id() < )); < - if (($theme = $request->query->get('theme')) && in_array($theme, array_keys(list_themes()))) { < + if (($theme = $request->query->get('theme')) && in_array($theme, array_keys(\Drupal::service('theme_handler')->listInfo()))) { < // We have navigated to this page from the block library and will keep track < // of the theme for redirecting the user to the configuration page for the < // newly created block in the given theme. < diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php < index 82cb852..a603a00 100644 < --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php < +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php < @@ -152,7 +152,7 @@ public function testsCustomBlockAddTypes() { < ->getStorageController('custom_block'); < < // Enable all themes. < - theme_enable(array('bartik', 'seven')); < + \Drupal::service('theme_handler')->enable(array('bartik', 'seven')); < $themes = array('bartik', 'seven', 'stark'); < $theme_settings = $this->container->get('config.factory')->get('system.theme'); < foreach ($themes as $default_theme) { < diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockFormController.php < index 4ce4c81..ef5bd60 100644 < --- a/core/modules/block/lib/Drupal/block/BlockFormController.php < +++ b/core/modules/block/lib/Drupal/block/BlockFormController.php < @@ -229,7 +229,7 @@ public function form(array $form, array &$form_state) { --- > diff --git a/core/modules/block/src/BlockForm.php b/core/modules/block/src/BlockForm.php > index e3d442d..8759710 100644 > --- a/core/modules/block/src/BlockForm.php > +++ b/core/modules/block/src/BlockForm.php > @@ -90,7 +90,7 @@ public function form(array $form, FormStateInterface $form_state) { 123,140c122,126 < diff --git a/core/modules/block/lib/Drupal/block/Controller/BlockController.php b/core/modules/block/lib/Drupal/block/Controller/BlockController.php < index ebd9bc9..ee05f8c 100644 < --- a/core/modules/block/lib/Drupal/block/Controller/BlockController.php < +++ b/core/modules/block/lib/Drupal/block/Controller/BlockController.php < @@ -26,7 +26,7 @@ class BlockController extends ControllerBase { < * A render array containing the CSS and title for the block region demo. < */ < public function demo($theme) { < - $themes = list_themes(); < + $themes = \Drupal::service('theme_handler')->listInfo(); < return array( < '#title' => String::checkPlain($themes[$theme]->info['name']), < '#attached' => array( < diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockAdminThemeTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockAdminThemeTest.php < index d553440..6265907 100644 < --- a/core/modules/block/lib/Drupal/block/Tests/BlockAdminThemeTest.php < +++ b/core/modules/block/lib/Drupal/block/Tests/BlockAdminThemeTest.php < @@ -42,7 +42,7 @@ function testAdminTheme() { --- > diff --git a/core/modules/block/src/Tests/BlockAdminThemeTest.php b/core/modules/block/src/Tests/BlockAdminThemeTest.php > index 20b892c..9945193 100644 > --- a/core/modules/block/src/Tests/BlockAdminThemeTest.php > +++ b/core/modules/block/src/Tests/BlockAdminThemeTest.php > @@ -36,7 +36,7 @@ function testAdminTheme() { 149,153c135,139 < diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php < index 3fa85d6..6fe57e1 100644 < --- a/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php < +++ b/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php < @@ -60,7 +60,7 @@ public function testBlockNotInHiddenRegion() { --- > diff --git a/core/modules/block/src/Tests/BlockHiddenRegionTest.php b/core/modules/block/src/Tests/BlockHiddenRegionTest.php > index c46d082..9bfdfee 100644 > --- a/core/modules/block/src/Tests/BlockHiddenRegionTest.php > +++ b/core/modules/block/src/Tests/BlockHiddenRegionTest.php > @@ -55,7 +55,7 @@ public function testBlockNotInHiddenRegion() { 162,166c148,152 < diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php < index e7b99e1..87364a3 100644 < --- a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php < +++ b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php < @@ -158,7 +158,7 @@ function testBlock() { --- > diff --git a/core/modules/block/src/Tests/BlockTest.php b/core/modules/block/src/Tests/BlockTest.php > index ebd4a7c..532bc7a 100644 > --- a/core/modules/block/src/Tests/BlockTest.php > +++ b/core/modules/block/src/Tests/BlockTest.php > @@ -154,7 +154,7 @@ function testBlock() { 175,179c161,174 < diff --git a/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php b/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php < index c544960..c4a4ffe 100644 < --- a/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php < +++ b/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php < @@ -51,7 +51,7 @@ function testNewDefaultThemeBlocks() { --- > @@ -184,7 +184,7 @@ function testThemeName() { > $this->drupalPlaceBlock('system_help_block', array('region' => 'help')); > // Explicitly set the default and admin themes. > $theme = 'block_test_specialchars_theme'; > - theme_enable(array($theme)); > + \Drupal::service('theme_handler')->enable(array($theme)); > \Drupal::service('router.builder')->rebuild(); > $this->drupalGet('admin/structure/block'); > $this->assertRaw(String::checkPlain('<"Cat" & \'Mouse\'>')); > diff --git a/core/modules/block/src/Tests/NewDefaultThemeBlocksTest.php b/core/modules/block/src/Tests/NewDefaultThemeBlocksTest.php > index 9a6642c..9263ba6 100644 > --- a/core/modules/block/src/Tests/NewDefaultThemeBlocksTest.php > +++ b/core/modules/block/src/Tests/NewDefaultThemeBlocksTest.php > @@ -45,7 +45,7 @@ function testNewDefaultThemeBlocks() { 188,192c183,187 < diff --git a/core/modules/block/lib/Drupal/block/Tests/NonDefaultBlockAdminTest.php b/core/modules/block/lib/Drupal/block/Tests/NonDefaultBlockAdminTest.php < index 72f3d1d..cdfbdd9 100644 < --- a/core/modules/block/lib/Drupal/block/Tests/NonDefaultBlockAdminTest.php < +++ b/core/modules/block/lib/Drupal/block/Tests/NonDefaultBlockAdminTest.php < @@ -33,7 +33,7 @@ function testNonDefaultBlockAdmin() { --- > diff --git a/core/modules/block/src/Tests/NonDefaultBlockAdminTest.php b/core/modules/block/src/Tests/NonDefaultBlockAdminTest.php > index f7ffd37..1a6fcbe 100644 > --- a/core/modules/block/src/Tests/NonDefaultBlockAdminTest.php > +++ b/core/modules/block/src/Tests/NonDefaultBlockAdminTest.php > @@ -30,7 +30,7 @@ function testNonDefaultBlockAdmin() { 201,224c196,214 < diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointThemeTest.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointThemeTest.php < index 153df41..1e25edd 100644 < --- a/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointThemeTest.php < +++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointThemeTest.php < @@ -25,7 +25,7 @@ public static function getInfo() { < < public function setUp() { < parent::setUp(); < - theme_enable(array('breakpoint_test_theme')); < + \Drupal::service('theme_handler')->enable(array('breakpoint_test_theme')); < } < < /** < @@ -53,7 +53,7 @@ public function testThemeBreakpoints() { < $this->verifyBreakpointGroup($breakpoint_group_obj); < < // Disable the test theme and verify the breakpoint group is deleted. < - theme_disable(array('breakpoint_test_theme')); < + \Drupal::service('theme_handler')->disable(array('breakpoint_test_theme')); < $this->assertFalse(entity_load('breakpoint_group', $breakpoint_group_obj->id()), 'breakpoint_group_load: Loading a deleted breakpoint group returns false.', 'Breakpoint API'); < } < < @@ -81,7 +81,7 @@ public function testThemeBreakpointGroup() { < $this->verifyBreakpointGroup($breakpoint_group_obj); --- > diff --git a/core/modules/block_content/src/Controller/BlockContentController.php b/core/modules/block_content/src/Controller/BlockContentController.php > index 4716bba..95ead17 100644 > --- a/core/modules/block_content/src/Controller/BlockContentController.php > +++ b/core/modules/block_content/src/Controller/BlockContentController.php > @@ -90,7 +90,7 @@ public function addForm(BlockContentTypeInterface $block_content_type, Request $ > $block = $this->blockContentStorage->create(array( > 'type' => $block_content_type->id() > )); > - if (($theme = $request->query->get('theme')) && in_array($theme, array_keys(list_themes()))) { > + if (($theme = $request->query->get('theme')) && in_array($theme, array_keys(\Drupal::service('theme_handler')->listInfo()))) { > // We have navigated to this page from the block library and will keep track > // of the theme for redirecting the user to the configuration page for the > // newly created block in the given theme. > diff --git a/core/modules/block_content/src/Tests/BlockContentTypeTest.php b/core/modules/block_content/src/Tests/BlockContentTypeTest.php > index b36d009..9c2745c 100644 > --- a/core/modules/block_content/src/Tests/BlockContentTypeTest.php > +++ b/core/modules/block_content/src/Tests/BlockContentTypeTest.php > @@ -143,7 +143,7 @@ public function testsBlockContentAddTypes() { > ->getStorage('block_content'); 226,230c216,231 < // Disable the test theme and verify the breakpoint group is deleted. < - theme_disable(array('breakpoint_test_theme')); < + \Drupal::service('theme_handler')->disable(array('breakpoint_test_theme')); < $this->assertFalse(entity_load('breakpoint_group', $breakpoint_group_obj->id()), 'breakpoint_group_load: Loading a deleted breakpoint group returns false.', 'Breakpoint API'); < } --- > // Enable all themes. > - theme_enable(array('bartik', 'seven')); > + \Drupal::service('theme_handler')->enable(array('bartik', 'seven')); > $themes = array('bartik', 'seven', 'stark'); > $theme_settings = $this->container->get('config.factory')->get('system.theme'); > foreach ($themes as $default_theme) { > diff --git a/core/modules/color/color.module b/core/modules/color/color.module > index 7010ddf..a933bdc 100644 > --- a/core/modules/color/color.module > +++ b/core/modules/color/color.module > @@ -69,7 +69,7 @@ function color_form_system_theme_settings_alter(&$form, FormStateInterface $form > */ > function color_css_alter(&$css) { > $theme_key = \Drupal::theme()->getActiveTheme()->getName(); > - $themes = list_themes(); > + $themes = \Drupal::service('theme_handler')->listInfo(); 232,236c233,239 < diff --git a/core/modules/color/lib/Drupal/color/Tests/ColorTest.php b/core/modules/color/lib/Drupal/color/Tests/ColorTest.php < index 2e14d68..9eec044 100644 < --- a/core/modules/color/lib/Drupal/color/Tests/ColorTest.php < +++ b/core/modules/color/lib/Drupal/color/Tests/ColorTest.php < @@ -52,7 +52,7 @@ function setUp() { --- > // Override stylesheets. > $color_paths = \Drupal::config('color.theme.' . $theme_key)->get('stylesheets'); > diff --git a/core/modules/color/src/Tests/ColorTest.php b/core/modules/color/src/Tests/ColorTest.php > index c7260a1..de5bc85 100644 > --- a/core/modules/color/src/Tests/ColorTest.php > +++ b/core/modules/color/src/Tests/ColorTest.php > @@ -70,7 +70,7 @@ protected function setUp() { 243c246 < // Array filled with valid and not valid color values --- > // Array filled with valid and not valid color values. 245,249c248,261 < diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentLinksTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentLinksTest.php < index cf7af82..d41bdd0 100644 < --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentLinksTest.php < +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentLinksTest.php < @@ -47,7 +47,7 @@ public static function getInfo() { --- > diff --git a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php > index 1dc314d..4b55ad0 100644 > --- a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php > +++ b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php > @@ -98,7 +98,7 @@ public function testShortcutLinkAdd() { > * Tests that the "add to shortcut" and "remove from shortcut" links work. > */ > public function testShortcutQuickLink() { > - theme_enable(array('seven')); > + \Drupal::service('theme_handler')->enable(array('seven')); > \Drupal::config('system.theme')->set('admin', 'seven')->save(); > $this->container->get('config.factory')->get('node.settings')->set('use_admin_theme', '1')->save(); > $this->container->get('router.builder')->rebuild(); > @@ -202,7 +202,7 @@ public function testShortcutLinkDelete() { 251,254c263,266 < function testCommentLinks() { < // Bartik theme alters comment links, so use a different theme. < - theme_enable(array('stark')); < + \Drupal::service('theme_handler')->enable(array('stark')); --- > public function testNoShortcutLink() { > // Change to a theme that displays shortcuts. > - theme_enable(array('seven')); > + \Drupal::service('theme_handler')->enable(array('seven')); 256c268 < ->set('default', 'stark') --- > ->set('default', 'seven') 258,275c270,274 < diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php < index ed4b1e2..48b3123 100644 < --- a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php < +++ b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php < @@ -668,7 +668,7 @@ public function testAlterInfo() { < public function testThemeDiscovery() { < // Enable the test theme and rebuild routes. < $theme = 'config_translation_test_theme'; < - theme_enable(array($theme)); < + \Drupal::service('theme_handler')->enable(array($theme)); < // Enabling a theme will cause the kernel terminate event to rebuild the < // router. Simulate that here. < \Drupal::service('router.builder')->rebuildIfNeeded(); < diff --git a/core/modules/system/lib/Drupal/system/Controller/ThemeController.php b/core/modules/system/lib/Drupal/system/Controller/ThemeController.php < index ece04d5..ca5f0f6 100644 < --- a/core/modules/system/lib/Drupal/system/Controller/ThemeController.php < +++ b/core/modules/system/lib/Drupal/system/Controller/ThemeController.php < @@ -36,7 +36,7 @@ public function disable(Request $request) { --- > diff --git a/core/modules/system/src/Controller/ThemeController.php b/core/modules/system/src/Controller/ThemeController.php > index 51d91f9..22b9901 100644 > --- a/core/modules/system/src/Controller/ThemeController.php > +++ b/core/modules/system/src/Controller/ThemeController.php > @@ -75,10 +75,12 @@ public function disable(Request $request) { 279,297d277 < - $themes = list_themes(); < + $themes = $this->themeHandler->listInfo(); < < // Check if the specified theme is one recognized by the system. < if (!empty($themes[$theme])) { < @@ -45,7 +45,7 @@ public function disable(Request $request) { < drupal_set_message(t('%theme is the default theme and cannot be disabled.', array('%theme' => $themes[$theme]->info['name'])), 'error'); < } < else { < - theme_disable(array($theme)); < + $this->themeHandler->disable(array($theme)); < drupal_set_message(t('The %theme theme has been disabled.', array('%theme' => $themes[$theme]->info['name']))); < } < } < @@ -77,11 +77,12 @@ public function enable(Request $request) { < < if (isset($theme)) { < // Get current list of themes. < - $themes = list_themes(TRUE); 299c279 < + $themes = $this->themeHandler->listInfo(); --- > $themes = $this->themeHandler->listInfo(); 303d282 < - theme_enable(array($theme)); 305,313c284,292 < drupal_set_message(t('The %theme theme has been enabled.', array('%theme' => $themes[$theme]->info['name']))); < } < else { < diff --git a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php < index 9459aad..bd5f016 100644 < --- a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php < +++ b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php < @@ -67,7 +67,7 @@ public function getFormId() { < public function buildForm(array $form, array &$form_state, $theme = '') { --- > // Do not disable the default or admin theme. > if ($theme === $config->get('default') || $theme === $config->get('admin')) { > drupal_set_message($this->t('%theme is the default theme and cannot be disabled.', array('%theme' => $themes[$theme]->info['name'])), 'error'); > diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php > index 85a58a5..40bddfc 100644 > --- a/core/modules/system/src/Form/ThemeSettingsForm.php > +++ b/core/modules/system/src/Form/ThemeSettingsForm.php > @@ -69,7 +69,7 @@ public function getFormId() { > public function buildForm(array $form, FormStateInterface $form_state, $theme = '') { 321c300 < @@ -78,7 +78,7 @@ public function buildForm(array $form, array &$form_state, $theme = '') { --- > @@ -80,7 +80,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $theme = 330,347c309,313 < diff --git a/core/modules/system/lib/Drupal/system/Plugin/Derivative/ThemeLocalTask.php b/core/modules/system/lib/Drupal/system/Plugin/Derivative/ThemeLocalTask.php < index da6910d..2e9a39f 100644 < --- a/core/modules/system/lib/Drupal/system/Plugin/Derivative/ThemeLocalTask.php < +++ b/core/modules/system/lib/Drupal/system/Plugin/Derivative/ThemeLocalTask.php < @@ -18,7 +18,7 @@ class ThemeLocalTask extends DerivativeBase { < * {@inheritdoc} < */ < public function getDerivativeDefinitions($base_plugin_definition) { < - foreach (list_themes() as $theme_name => $theme) { < + foreach (\Drupal::service('theme_handler')->listInfo() as $theme_name => $theme) { < if ($theme->status) { < $this->derivatives[$theme_name] = $base_plugin_definition; < $this->derivatives[$theme_name]['title'] = $theme->info['name']; < diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php < index aa51ab5..ffe3141 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php < @@ -221,7 +221,7 @@ public function testCurrentPathChange() { --- > diff --git a/core/modules/system/src/Tests/Ajax/FrameworkTest.php b/core/modules/system/src/Tests/Ajax/FrameworkTest.php > index 340b597..57fe366 100644 > --- a/core/modules/system/src/Tests/Ajax/FrameworkTest.php > +++ b/core/modules/system/src/Tests/Ajax/FrameworkTest.php > @@ -218,7 +218,7 @@ public function testCurrentPathChange() { 356,451c322,326 < diff --git a/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php b/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php < index f268e02..2185abb 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php < @@ -38,7 +38,7 @@ function testBatchProgressPageTheme() { < \Drupal::config('system.theme') < ->set('default', 'bartik') < ->save(); < - theme_enable(array('seven')); < + \Drupal::service('theme_handler')->enable(array('seven')); < \Drupal::config('system.theme')->set('admin', 'seven')->save(); < // Log in as an administrator who can see the administrative theme. < $admin_user = $this->drupalCreateUser(array('view the administration theme')); < diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php < index 72fe06a..1066f96 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php < @@ -384,19 +384,19 @@ protected function initializeTestThemeConfiguration() { < $this->default_theme = 'bartik'; < $this->admin_theme = 'seven'; < $this->alternate_theme = 'stark'; < - theme_enable(array($this->default_theme)); < + \Drupal::service('theme_handler')->enable(array($this->default_theme)); < \Drupal::config('system.theme') < ->set('default', $this->default_theme) < ->set('admin', $this->admin_theme) < ->save(); < - theme_disable(array($this->alternate_theme)); < + \Drupal::service('theme_handler')->disable(array($this->alternate_theme)); < } < < /** < * Test the theme negotiation when it is set to use an administrative theme. < */ < protected function doTestThemeCallbackAdministrative() { < - theme_enable(array($this->admin_theme)); < + \Drupal::service('theme_handler')->enable(array($this->admin_theme)); < $this->drupalGet('menu-test/theme-callback/use-admin-theme'); < $this->assertText('Active theme: seven. Actual theme: seven.', 'The administrative theme can be correctly set in a theme negotiation.'); < $this->assertRaw('seven/style.css', "The administrative theme's CSS appears on the page."); < @@ -407,7 +407,7 @@ protected function doTestThemeCallbackAdministrative() { < */ < protected function doTestThemeCallbackMaintenanceMode() { < $this->container->get('state')->set('system.maintenance_mode', TRUE); < - theme_enable(array($this->admin_theme)); < + \Drupal::service('theme_handler')->enable(array($this->admin_theme)); < < // For a regular user, the fact that the site is in maintenance mode means < // we expect the theme callback system to be bypassed entirely. < @@ -434,7 +434,7 @@ protected function doTestThemeCallbackOptionalTheme() { < $this->assertRaw('bartik/css/style.css', "The default theme's CSS appears on the page."); < < // Now enable the theme and request it again. < - theme_enable(array($this->alternate_theme)); < + \Drupal::service('theme_handler')->enable(array($this->alternate_theme)); < $this->drupalGet('menu-test/theme-callback/use-stark-theme'); < $this->assertText('Active theme: stark. Actual theme: stark.', 'The theme negotiation system uses an optional theme once it has been enabled.'); < $this->assertRaw('stark/css/layout.css', "The optional theme's CSS appears on the page."); < diff --git a/core/modules/system/lib/Drupal/system/Tests/System/InfoAlterTest.php b/core/modules/system/lib/Drupal/system/Tests/System/InfoAlterTest.php < index 5175b7f..1b70509 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/System/InfoAlterTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/System/InfoAlterTest.php < @@ -33,7 +33,7 @@ function testSystemInfoAlter() { < $info = system_rebuild_module_data(); < $this->assertFalse(isset($info['node']->info['required']), 'Before the module_test is installed the node module is not required.'); < // Enable seven and the test module. < - theme_enable(array('seven')); < + \Drupal::service('theme_handler')->enable(array('seven')); < \Drupal::moduleHandler()->install(array('module_test'), FALSE); < $this->assertTrue(\Drupal::moduleHandler()->moduleExists('module_test'), 'Test module is enabled.'); < < @@ -45,8 +45,8 @@ function testSystemInfoAlter() { < $system_list_themes = system_list('theme'); < $info = $system_list_themes['seven']->info; < $this->assertTrue(isset($info['regions']['test_region']), 'Altered theme info was returned by system_list().'); < - $list_themes = list_themes(); < - $this->assertTrue(isset($list_themes['seven']->info['regions']['test_region']), 'Altered theme info was returned by list_themes().'); < + $list_themes = \Drupal::service('theme_handler')->listInfo(); < + $this->assertTrue(isset($list_themes['seven']->info['regions']['test_region']), 'Altered theme info was returned by listInfo().'); < system_list_reset(); < $info = system_rebuild_module_data(); < $this->assertTrue($info['node']->info['required'], 'After the module_test is installed the node module is required.'); < diff --git a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php < index 520cb11..f644cc5 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php < @@ -178,7 +178,7 @@ function testThemeSettings() { < * Test the administration theme functionality. < */ < function testAdministrationTheme() { < - theme_enable(array('bartik', 'seven')); < + \Drupal::service('theme_handler')->enable(array('bartik', 'seven')); < < // Enable an administration theme and show it on the node admin pages. < $edit = array( < @@ -233,7 +233,7 @@ function testAdministrationTheme() { --- > diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php > index 6912afb..2843911 100644 > --- a/core/modules/system/src/Tests/System/ThemeTest.php > +++ b/core/modules/system/src/Tests/System/ThemeTest.php > @@ -239,7 +239,7 @@ function testAdministrationTheme() { 460,464c335,365 < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php < index b2816aa..a43e697 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php < @@ -86,7 +86,7 @@ function setUp() { --- > diff --git a/core/modules/system/src/Tests/Theme/EnginePhpTemplateTest.php b/core/modules/system/src/Tests/Theme/EnginePhpTemplateTest.php > index 4108d61..7245adb 100644 > --- a/core/modules/system/src/Tests/Theme/EnginePhpTemplateTest.php > +++ b/core/modules/system/src/Tests/Theme/EnginePhpTemplateTest.php > @@ -25,7 +25,7 @@ class EnginePhpTemplateTest extends WebTestBase { > > protected function setUp() { > parent::setUp(); > - theme_enable(array('test_theme_phptemplate')); > + \Drupal::service('theme_handler')->enable(array('test_theme_phptemplate')); > } > > /** > diff --git a/core/modules/system/src/Tests/Theme/EngineTwigTest.php b/core/modules/system/src/Tests/Theme/EngineTwigTest.php > index c03f16b..ed53310 100644 > --- a/core/modules/system/src/Tests/Theme/EngineTwigTest.php > +++ b/core/modules/system/src/Tests/Theme/EngineTwigTest.php > @@ -25,7 +25,7 @@ class EngineTwigTest extends WebTestBase { > > protected function setUp() { > parent::setUp(); > - theme_enable(array('test_theme')); > + \Drupal::service('theme_handler')->enable(array('test_theme')); > } > > /** > diff --git a/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php b/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php > index 26aa7ec..c3e7ebc 100644 > --- a/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php > +++ b/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php > @@ -81,7 +81,7 @@ protected function setUp() { 473,477c374,378 < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeInfoStylesTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeInfoStylesTest.php < index c152a27..865db14 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeInfoStylesTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeInfoStylesTest.php < @@ -33,7 +33,7 @@ public static function getInfo() { --- > diff --git a/core/modules/system/src/Tests/Theme/ThemeInfoStylesTest.php b/core/modules/system/src/Tests/Theme/ThemeInfoStylesTest.php > index 764d0b9..8a8ee92 100644 > --- a/core/modules/system/src/Tests/Theme/ThemeInfoStylesTest.php > +++ b/core/modules/system/src/Tests/Theme/ThemeInfoStylesTest.php > @@ -27,7 +27,7 @@ class ThemeInfoStylesTest extends WebTestBase { 486,490c387,391 < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeSuggestionsAlterTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeSuggestionsAlterTest.php < index a987e1f..faf5783 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeSuggestionsAlterTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeSuggestionsAlterTest.php < @@ -31,7 +31,7 @@ public static function getInfo() { --- > diff --git a/core/modules/system/src/Tests/Theme/ThemeSuggestionsAlterTest.php b/core/modules/system/src/Tests/Theme/ThemeSuggestionsAlterTest.php > index 54fdfce..e938cf6 100644 > --- a/core/modules/system/src/Tests/Theme/ThemeSuggestionsAlterTest.php > +++ b/core/modules/system/src/Tests/Theme/ThemeSuggestionsAlterTest.php > @@ -26,7 +26,7 @@ class ThemeSuggestionsAlterTest extends WebTestBase { 492c393 < function setUp() { --- > protected function setUp() { 499,503c400,404 < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php < index 638d8e5..0f25b18 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php < @@ -32,7 +32,7 @@ public static function getInfo() { --- > diff --git a/core/modules/system/src/Tests/Theme/ThemeTest.php b/core/modules/system/src/Tests/Theme/ThemeTest.php > index 5195163..0ac06ea 100644 > --- a/core/modules/system/src/Tests/Theme/ThemeTest.php > +++ b/core/modules/system/src/Tests/Theme/ThemeTest.php > @@ -27,7 +27,7 @@ class ThemeTest extends WebTestBase { 505c406 < function setUp() { --- > protected function setUp() { 512c413 < @@ -199,13 +199,14 @@ function testFunctionOverride() { --- > @@ -195,15 +195,18 @@ function testFunctionOverride() { 520c421,424 < - $themes = list_themes(); --- > $theme_handler = $this->container->get('theme_handler'); > $theme_handler->enable(array('test_subtheme')); > $themes = $theme_handler->listInfo(); > 526d429 < - // Check if list_themes() returns disabled themes. 528c431 < $this->assertTrue(array_key_exists('test_basetheme', $themes), 'Disabled theme detected'); --- > 531,561c434,438 < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestPhpTemplate.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestPhpTemplate.php < index 35680fa..948e486 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestPhpTemplate.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestPhpTemplate.php < @@ -31,7 +31,7 @@ public static function getInfo() { < < function setUp() { < parent::setUp(); < - theme_enable(array('test_theme_phptemplate')); < + \Drupal::service('theme_handler')->enable(array('test_theme_phptemplate')); < } < < /** < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php < index 2dce51f..110c88c 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php < @@ -31,7 +31,7 @@ public static function getInfo() { < < function setUp() { < parent::setUp(); < - theme_enable(array('test_theme')); < + \Drupal::service('theme_handler')->enable(array('test_theme')); < } < < /** < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php < index 9c2105a..cb9f034 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php < @@ -34,7 +34,7 @@ public static function getInfo() { --- > diff --git a/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php b/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php > index efb0818..8eda580 100644 > --- a/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php > +++ b/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php > @@ -28,7 +28,7 @@ class TwigDebugMarkupTest extends WebTestBase { 569,574c446,451 < $this->settingsSet('twig_debug', TRUE); < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigExtensionTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigExtensionTest.php < index 8fdc293..bcc9208 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigExtensionTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigExtensionTest.php < @@ -31,7 +31,7 @@ public static function getInfo() { --- > $parameters = $this->container->getParameter('twig.config'); > diff --git a/core/modules/system/src/Tests/Theme/TwigExtensionTest.php b/core/modules/system/src/Tests/Theme/TwigExtensionTest.php > index 05c19d3..7a796bf 100644 > --- a/core/modules/system/src/Tests/Theme/TwigExtensionTest.php > +++ b/core/modules/system/src/Tests/Theme/TwigExtensionTest.php > @@ -25,7 +25,7 @@ class TwigExtensionTest extends WebTestBase { 576c453 < function setUp() { --- > protected function setUp() { 583,600c460,477 < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php < index 5689b3d..1d9dcfc 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php < @@ -77,7 +77,7 @@ function testTwigDebugOverride() { < */ < function testTwigCacheOverride() { < $extension = twig_extension(); < - theme_enable(array('test_theme')); < + \Drupal::service('theme_handler')->enable(array('test_theme')); < \Drupal::config('system.theme') < ->set('default', 'test_theme') < ->save(); < diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigTransTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigTransTest.php < index 0aa1f1f..c40e4ec 100644 < --- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigTransTest.php < +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigTransTest.php < @@ -64,7 +64,7 @@ protected function setUp() { --- > diff --git a/core/modules/system/src/Tests/Theme/TwigNamespaceTest.php b/core/modules/system/src/Tests/Theme/TwigNamespaceTest.php > index 499de80..5661b41 100644 > --- a/core/modules/system/src/Tests/Theme/TwigNamespaceTest.php > +++ b/core/modules/system/src/Tests/Theme/TwigNamespaceTest.php > @@ -30,7 +30,7 @@ class TwigNamespaceTest extends WebTestBase { > > protected function setUp() { > parent::setUp(); > - theme_enable(array('test_theme', 'bartik')); > + \Drupal::service('theme_handler')->enable(array('test_theme', 'bartik')); > $this->twig = \Drupal::service('twig'); > } > > diff --git a/core/modules/system/src/Tests/Theme/TwigTransTest.php b/core/modules/system/src/Tests/Theme/TwigTransTest.php > index 20beeb5..e5f1c4d 100644 > --- a/core/modules/system/src/Tests/Theme/TwigTransTest.php > +++ b/core/modules/system/src/Tests/Theme/TwigTransTest.php > @@ -53,7 +53,7 @@ protected function setUp() { 609,628d485 < diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc < index 75f1c60..aac17a3 100644 < --- a/core/modules/system/system.admin.inc < +++ b/core/modules/system/system.admin.inc < @@ -19,13 +19,13 @@ function system_theme_default() { < $theme = $request->get('theme'); < if (!empty($theme)) { < // Get current list of themes. < - $themes = list_themes(); < + $themes = \Drupal::service('theme_handler')->listInfo(); < < // Check if the specified theme is one recognized by the system. < if (!empty($themes[$theme])) { < // Enable the theme if it is currently disabled. < if (empty($themes[$theme]->status)) { < - theme_enable(array($theme)); < + \Drupal::service('theme_handler')->enable(array($theme)); < } < // Set the default theme. < \Drupal::config('system.theme') 630c487 < index 8ae6c7c..5f3c973 100644 --- > index 59922b7..ce60d05 100644 633c490 < @@ -1460,7 +1460,7 @@ function hook_cache_flush() { --- > @@ -1349,7 +1349,7 @@ function hook_cache_flush() { 642,654c499,511 < diff --git a/core/modules/system/system.install b/core/modules/system/system.install < index 7a7208e..3d2a820 100644 < --- a/core/modules/system/system.install < +++ b/core/modules/system/system.install < @@ -566,7 +566,7 @@ function system_requirements($phase) { < * Implements hook_install(). < */ < function system_install() { < - // Enable and set the default theme. Can't use theme_enable() this early in < + // Enable and set the default theme. Can't use ThemeHandlerInterface::enable() this early in < // installation. < \Drupal::service('config.installer')->installDefaultConfig('theme', 'stark'); < \Drupal::config('system.theme') --- > diff --git a/core/modules/system/system.module b/core/modules/system/system.module > index f3b65a2..18fa335 100644 > --- a/core/modules/system/system.module > +++ b/core/modules/system/system.module > @@ -100,7 +100,7 @@ function system_help($route_name, RouteMatchInterface $route_match) { > return $output; > > case 'system.theme_settings_theme': > - $theme_list = list_themes(); > + $theme_list = \Drupal::service('theme_handler')->listInfo(); > $theme = $theme_list[$route_match->getParameter('theme')]; > return '

' . t('These options control the display settings for the %name theme. When your site is displayed using this theme, these settings will be used.', array('%name' => $theme->info['name'])) . '

'; > 656c513 < index c86b161..a61020a 100644 --- > index fabde88..ae8a82f 100644 659c516 < @@ -327,7 +327,7 @@ function hook_theme_suggestions_HOOK_alter(array &$suggestions, array $variables --- > @@ -460,7 +460,7 @@ function hook_theme_suggestions_HOOK_alter(array &$suggestions, array $variables 668,672c525,529 < diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/ThemeTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/ThemeTest.php < index ee8cc38..b5ca140 100644 < --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/ThemeTest.php < +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/ThemeTest.php < @@ -25,7 +25,7 @@ function setUp() { --- > diff --git a/core/modules/taxonomy/src/Tests/ThemeTest.php b/core/modules/taxonomy/src/Tests/ThemeTest.php > index 9bf1a62..10e2d50 100644 > --- a/core/modules/taxonomy/src/Tests/ThemeTest.php > +++ b/core/modules/taxonomy/src/Tests/ThemeTest.php > @@ -19,7 +19,7 @@ protected function setUp() { 681,698c538,542 < diff --git a/core/modules/tour/lib/Drupal/tour/Tests/TourTestBasic.php b/core/modules/tour/lib/Drupal/tour/Tests/TourTestBasic.php < index e6da900..3194d6f 100644 < --- a/core/modules/tour/lib/Drupal/tour/Tests/TourTestBasic.php < +++ b/core/modules/tour/lib/Drupal/tour/Tests/TourTestBasic.php < @@ -53,7 +53,7 @@ protected function setUp() { < ->get('system.theme') < ->set('default', 'bartik') < ->save(); < - theme_enable(array('seven')); < + \Drupal::service('theme_handler')->enable(array('seven')); < $this->container->get('config.factory') < ->get('system.theme') < ->set('admin', 'seven') < diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php < index a184092..4adab8a 100644 < --- a/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php < +++ b/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php < @@ -168,7 +168,7 @@ function testUpdateContribOrder() { --- > diff --git a/core/modules/update/src/Tests/UpdateContribTest.php b/core/modules/update/src/Tests/UpdateContribTest.php > index 0e547ef..0ec7670 100644 > --- a/core/modules/update/src/Tests/UpdateContribTest.php > +++ b/core/modules/update/src/Tests/UpdateContribTest.php > @@ -163,7 +163,7 @@ function testUpdateContribOrder() { 707c551 < @@ -271,7 +271,7 @@ function testUpdateHiddenBaseTheme() { --- > @@ -266,7 +266,7 @@ function testUpdateHiddenBaseTheme() { 716,720c560,564 < diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php < index caade6e..7cbee4e 100644 < --- a/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php < +++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php < @@ -29,7 +29,7 @@ public function buildForm(array $form, array &$form_state) { --- > diff --git a/core/modules/views_ui/src/Form/BasicSettingsForm.php b/core/modules/views_ui/src/Form/BasicSettingsForm.php > index 621f1a4..e671553 100644 > --- a/core/modules/views_ui/src/Form/BasicSettingsForm.php > +++ b/core/modules/views_ui/src/Form/BasicSettingsForm.php > @@ -30,7 +30,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { 722c566 < $config = $this->configFactory->get('views.settings'); --- > $config = $this->config('views.settings'); 729,753d572 < diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install < index bec1107..849af9e 100644 < --- a/core/profiles/standard/standard.install < +++ b/core/profiles/standard/standard.install < @@ -20,8 +20,9 @@ function standard_install() { < \Drupal::config('system.theme') < ->set('default', $default_theme) < ->save(); < - theme_enable(array($default_theme)); < - theme_disable(array('stark')); < + $theme_handler = \Drupal::service('theme_handler'); < + $theme_handler->enable(array($default_theme)); < + $theme_handler->disable(array('stark')); < < // Set front page to "node". < \Drupal::config('system.site')->set('page.front', 'node')->save(); < @@ -78,7 +79,7 @@ function standard_install() { < $shortcut->save(); < < // Enable the admin theme. < - theme_enable(array('seven')); < + $theme_handler->enable(array('seven')); < \Drupal::config('system.theme')->set('admin', 'seven')->save(); < \Drupal::config('node.settings')->set('use_admin_theme', '1')->save(); < }