diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 3af30c8..2e655d9 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -5,6 +5,7 @@ * Admin page callbacks for the system module. */ +use Drupal\Core\Template\Attribute; use Drupal\system\DateFormatInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Response; @@ -137,16 +138,12 @@ function system_themes_page() { uasort($theme_groups['enabled'], 'system_sort_themes'); drupal_alter('system_themes_page', $theme_groups); - $build = array( - '#sorted' => TRUE, - ); - $build['system_themes_page'] = array( + return array( '#theme' => 'system_themes_page', '#theme_groups' => $theme_groups, '#theme_group_titles' => $theme_group_titles, + '#admin_theme_options' => $admin_theme_options, ); - $build['admin_form'] = drupal_get_form('system_themes_admin_form', $admin_theme_options); - return $build; } /** @@ -695,7 +692,9 @@ function theme_system_modules_uninstall($variables) { } /** - * Returns HTML for the Appearance page. + * Prepares variables for the appearance page template. + * + * Default template: system-themes-page.html.twig. * * @param $variables * An associative array containing: @@ -704,10 +703,10 @@ function theme_system_modules_uninstall($variables) { * * @ingroup themeable */ -function theme_system_themes_page($variables) { +function template_preprocess_system_themes_page(&$variables) { + $groups = array(); $theme_groups = $variables['theme_groups']; - - $output = '