diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 011db8d..39c728c 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1502,6 +1502,7 @@ function theme_enable($theme_list) { $disabled_themes->save(); list_themes(TRUE); + Drupal::service('router.builder')->rebuild(); menu_router_rebuild(); drupal_theme_rebuild(); @@ -1537,6 +1538,7 @@ function theme_disable($theme_list) { $disabled_themes->save(); list_themes(TRUE); + Drupal::service('router.builder')->rebuild(); menu_router_rebuild(); drupal_theme_rebuild(); diff --git a/core/modules/color/lib/Drupal/color/Tests/ColorTest.php b/core/modules/color/lib/Drupal/color/Tests/ColorTest.php index 577a3be..ccd22c02 100644 --- a/core/modules/color/lib/Drupal/color/Tests/ColorTest.php +++ b/core/modules/color/lib/Drupal/color/Tests/ColorTest.php @@ -48,7 +48,7 @@ function setUp() { ), ); theme_enable(array_keys($this->themes)); - \Drupal::service('router.builder')->rebuild(); + $this->container->get('router.builder')->rebuild(); menu_router_rebuild(); // Array filled with valid and not valid color values diff --git a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php index 3b2644f..26e8142 100644 --- a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php @@ -12,7 +12,7 @@ use Drupal\Core\Cache\Cache; use Drupal\Core\Config\ConfigFactory; use Drupal\Core\Config\Context\ContextInterface; -use Drupal\Core\Extension\ModuleHandler; +use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\system\SystemConfigFormBase; /** @@ -30,7 +30,7 @@ class ThemeSettingsForm extends SystemConfigFormBase { /** * {@inheritdoc} */ - public function __construct(ConfigFactory $config_factory, ContextInterface $context, ModuleHandler $module_handler) { + public function __construct(ConfigFactory $config_factory, ContextInterface $context, ModuleHandlerInterface $module_handler) { parent::__construct($config_factory, $context); $this->moduleHandler = $module_handler; diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 832d384..3082149 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -717,13 +717,13 @@ function system_menu() { 'type' => MENU_LOCAL_TASK, 'weight' => 100, ); - // Theme configuration subtabs. + // Theme configuration local tasks. $items['admin/appearance/settings/global'] = array( 'title' => 'Global settings', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - foreach (list_themes() as $key => $theme) { + foreach (list_themes(TRUE) as $theme) { if (!empty($theme->status)) { $items['admin/appearance/settings/' . $theme->name] = array( 'title' => $theme->info['name'], diff --git a/core/modules/system/system.routing.yml b/core/modules/system/system.routing.yml index 61e203c..c57d0ab 100644 --- a/core/modules/system/system.routing.yml +++ b/core/modules/system/system.routing.yml @@ -122,3 +122,17 @@ system_theme_enable: _controller: 'Drupal\system\Controller\ThemeController::enable' requirements: _permission: 'administer themes' + +system_theme_settings: + pattern: '/admin/appearance/settings' + defaults: + _form: '\Drupal\system\Form\ThemeSettingsForm' + requirements: + _permission: 'administer themes' + +system_theme_settings_global: + pattern: '/admin/appearance/settings/global' + defaults: + _form: '\Drupal\system\Form\ThemeSettingsForm' + requirements: + _permission: 'administer themes' diff --git a/core/modules/system/system.services.yml b/core/modules/system/system.services.yml index bd06f0d..ae48da7 100644 --- a/core/modules/system/system.services.yml +++ b/core/modules/system/system.services.yml @@ -7,6 +7,6 @@ services: class: Drupal\system\Plugin\Type\PluginUIManager arguments: ['@container.namespaces'] system.route_subscriber: - class: Drupal\system\EventSubscriber\RouteSubscriber + class: Drupal\system\Routing\RouteSubscriber tags: - { name: event_subscriber }