diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 0505615..7ba8a0b 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -11,7 +11,6 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Drupal\Core\Datetime\DrupalDateTime; -use Drupal\Core\Template\Attribute; use Drupal\system\Form\ModulesInstallConfirmForm; use Drupal\system\Form\ModulesUninstallConfirmForm; @@ -1402,7 +1401,7 @@ function template_preprocess_admin_block(&$variables) { function template_preprocess_admin_block_content(&$variables) { if (!empty($variables['content'])) { $compact = system_admin_compact_mode(); - $variables['attributes'] = new Attribute(array('class' => array('admin-list'))); + $variables['attributes'] = array('class' => array('admin-list')); if ($compact) { $variables['attributes']['class'][] = 'compact'; } @@ -1685,8 +1684,6 @@ function template_preprocess_system_themes_page(&$variables) { $groups = array(); $theme_groups = $variables['theme_groups']; - // Top level attributes. - $variables['attributes'] = !empty($variables['attributes']) ? new Attribute($variables['attributes']) : new Attribute(); // We have a default class variable that we don't want here. // @see http://drupal.org/node/1938430 unset($variables['attributes']['class']); @@ -1702,7 +1699,7 @@ function template_preprocess_system_themes_page(&$variables) { $theme_group['state'] = $state; $theme_group['title'] = $title; $theme_group['themes'] = array(); - $theme_group['attributes'] = new Attribute(array('class' => array('system-themes-list', 'system-themes-list-' . $state, 'clearfix'))); + $theme_group['attributes'] = array('class' => array('system-themes-list', 'system-themes-list-' . $state, 'clearfix')); foreach ($theme_groups[$state] as $theme) { $current_theme = array(); @@ -1724,7 +1721,7 @@ function template_preprocess_system_themes_page(&$variables) { // Style theme info $theme->classes[] = 'theme-selector'; $theme->classes[] = 'clearfix'; - $current_theme['attributes'] = new Attribute(array('class' => $theme->classes)); + $current_theme['attributes'] = array('class' => $theme->classes); $current_theme['name'] = $theme->info['name']; $current_theme['version'] = isset($theme->info['version']) ? $theme->info['version'] : ''; $current_theme['notes'] = count($theme->notes) ? '(' . join(', ', $theme->notes) . ')' : ''; @@ -1749,7 +1746,7 @@ function template_preprocess_system_themes_page(&$variables) { $current_theme['compatibility'] = array( '#theme' => 'links', '#links' => $theme->operations, - '#attributes' => new Attribute(array('class' => array('operations', 'clearfix'))), + '#attributes' => array('class' => array('operations', 'clearfix')), ); } $theme_group['themes'][] = $current_theme; diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 9d4fdd7..187b690 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -140,9 +140,9 @@ function system_theme() { return array_merge(drupal_common_theme(), array( 'system_themes_page' => array( 'variables' => array( - 'theme_groups' => array(), - 'theme_group_titles' => array(), - 'admin_theme_options' => array(), + 'theme_groups' => NULL, + 'theme_group_titles' => NULL, + 'admin_theme_options' => NULL, ), 'file' => 'system.admin.inc', 'template' => 'system-themes-page', @@ -162,36 +162,36 @@ function system_theme() { 'file' => 'system.admin.inc', ), 'status_report' => array( - 'variables' => array('requirements' => array()), + 'variables' => array('requirements' => NULL), 'file' => 'system.admin.inc', 'template' => 'status-report' ), 'admin_page' => array( - 'variables' => array('blocks' => array()), + 'variables' => array('blocks' => NULL), 'file' => 'system.admin.inc', 'template' => 'admin-page', ), 'admin_block' => array( - 'variables' => array('block' => array()), + 'variables' => array('block' => NULL), 'file' => 'system.admin.inc', 'template' => 'admin-block', ), 'admin_block_content' => array( - 'variables' => array('content' => array()), + 'variables' => array('content' => NULL), 'file' => 'system.admin.inc', 'template' => 'admin-block-content', ), 'system_admin_index' => array( - 'variables' => array('menu_items' => array()), + 'variables' => array('menu_items' => NULL), 'file' => 'system.admin.inc', 'template' => 'system-admin-index', ), 'system_powered_by' => array( - 'variables' => array(), + 'variables' => NULL, 'template' => 'system-powered-by', ), 'system_compact_link' => array( - 'variables' => array(), + 'variables' => NULL, 'template' => 'system-compact-link', ), 'system_date_format_localize_form' => array( @@ -3523,19 +3523,6 @@ function system_timezone($abbreviation = '', $offset = -1, $is_daylight_saving_t } /** - * Prepares variables for the Powered by Drupal template. - * - * Default template: system-powered-by.html.twig. - * - * This doesn't do anything extra to prepare the template, but is given simply - * for example purposes. - * - * @ingroup themeable - */ -function template_preprocess_system_powered_by(&$variables) { -} - -/** * Prepare variables for system compact link templates. * * Default template: system-compact-link.html.twig. diff --git a/core/modules/system/templates/admin-block-content.html.twig b/core/modules/system/templates/admin-block-content.html.twig index 80c0526..1900082 100644 --- a/core/modules/system/templates/admin-block-content.html.twig +++ b/core/modules/system/templates/admin-block-content.html.twig @@ -4,7 +4,7 @@ * Default theme implementation for the content of an administrative block. * * Available variables: - * - content: An array containing information about the block. Each element + * - content: A list containing information about the block. Each element * of the array represents an administrative menu item, and must at least * contain the keys 'title', 'href', and 'localized_options', which are * passed to l(). A 'description' key may also be provided. @@ -18,12 +18,12 @@ */ #} {% if content %} -