From 4129e3db2e65be223d060e46e2cc86e01e61c84c Mon Sep 17 00:00:00 2001 From: catch Date: Thu, 4 Mar 2021 20:59:58 +0000 Subject: [PATCH] Revert "Issue #3174832 by pfrenssen, Abhijith S, longwave, alexpott: admin-block-content template variable documentation is incorrect" This reverts commit 70a3c2c249b1b1a457b84df796d754bbc251bef7. --- core/modules/system/system.admin.inc | 9 ++++----- .../system/templates/admin-block-content.html.twig | 10 ++++------ .../templates/admin/admin-block-content.html.twig | 2 -- .../seven/templates/admin-block-content.html.twig | 4 +--- .../templates/admin/admin-block-content.html.twig | 10 ++++------ .../templates/admin/admin-block-content.html.twig | 10 ++++------ 6 files changed, 17 insertions(+), 28 deletions(-) diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 9c577d0f98e1..5ae24c07fbf0 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -18,11 +18,10 @@ use Drupal\Core\Url; * * @param $variables * An associative array containing: - * - content: List of administrative menu items. Each menu item contains: - * - url: Path to the admin section. - * - title: Short name of the section. - * - description: Description of the administrative menu item. - * - options: URL options. See \Drupal\Core\Url::fromUri() for details. + * - content: An array containing information about the block. Each element + * of the array represents an administrative menu item, and must at least + * contain the keys 'title', 'link_path', and 'localized_options', which are + * passed to l(). A 'description' key may also be provided. */ function template_preprocess_admin_block_content(&$variables) { if (!empty($variables['content'])) { diff --git a/core/modules/system/templates/admin-block-content.html.twig b/core/modules/system/templates/admin-block-content.html.twig index d1c6695b99cf..f1c5f27a4e62 100644 --- a/core/modules/system/templates/admin-block-content.html.twig +++ b/core/modules/system/templates/admin-block-content.html.twig @@ -4,12 +4,10 @@ * Default theme implementation for the content of an administrative block. * * Available variables: - * - content: List of administrative menu items. Each menu item contains: - * - link: Link to the admin section. - * - title: Short name of the section. - * - description: Description of the administrative menu item. - * - url: URI to the admin section. - * - options: URL options. See \Drupal\Core\Url::fromUri() for details. + * - 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', 'link_path', and 'localized_options', which are + * passed to l(). A 'description' key may also be provided. * - attributes: HTML attributes to be added to the element. * - compact: Boolean indicating whether compact mode is turned on or not. * diff --git a/core/themes/claro/templates/admin/admin-block-content.html.twig b/core/themes/claro/templates/admin/admin-block-content.html.twig index d57183e39f59..cc2f419c4f78 100644 --- a/core/themes/claro/templates/admin/admin-block-content.html.twig +++ b/core/themes/claro/templates/admin/admin-block-content.html.twig @@ -8,8 +8,6 @@ * - link: Link to the admin section. * - title: Short name of the section. * - description: Description of the administrative menu item. - * - url: URI to the admin section. - * - options: URL options. See \Drupal\Core\Url::fromUri() for details. * - attributes: HTML attributes to be added to the element. * - compact: Boolean indicating whether compact mode is turned on or not. * diff --git a/core/themes/seven/templates/admin-block-content.html.twig b/core/themes/seven/templates/admin-block-content.html.twig index ae111e2d3533..5991a1b5a6b2 100644 --- a/core/themes/seven/templates/admin-block-content.html.twig +++ b/core/themes/seven/templates/admin-block-content.html.twig @@ -7,11 +7,9 @@ * * Available variables: * - content: List of administrative menu items. Each menu item contains: - * - link: Link to the admin section. + * - url: Path to the admin section. * - title: Short name of the section. * - description: Description of the administrative menu item. - * - url: URI to the admin section. - * - options: URL options. See \Drupal\Core\Url::fromUri() for details. * - attributes: HTML attributes to be added to the element. * - compact: Boolean indicating whether compact mode is turned on or not. * diff --git a/core/themes/stable/templates/admin/admin-block-content.html.twig b/core/themes/stable/templates/admin/admin-block-content.html.twig index 536bffbce3e5..b59cc85a3ad1 100644 --- a/core/themes/stable/templates/admin/admin-block-content.html.twig +++ b/core/themes/stable/templates/admin/admin-block-content.html.twig @@ -4,12 +4,10 @@ * Theme override for the content of an administrative block. * * Available variables: - * - content: List of administrative menu items. Each menu item contains: - * - link: Link to the admin section. - * - title: Short name of the section. - * - description: Description of the administrative menu item. - * - url: URI to the admin section. - * - options: URL options. See \Drupal\Core\Url::fromUri() for details. + * - 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', 'link_path', and 'localized_options', which are + * passed to l(). A 'description' key may also be provided. * - attributes: HTML attributes to be added to the element. * - compact: Boolean indicating whether compact mode is turned on or not. * diff --git a/core/themes/stable9/templates/admin/admin-block-content.html.twig b/core/themes/stable9/templates/admin/admin-block-content.html.twig index 536bffbce3e5..b59cc85a3ad1 100644 --- a/core/themes/stable9/templates/admin/admin-block-content.html.twig +++ b/core/themes/stable9/templates/admin/admin-block-content.html.twig @@ -4,12 +4,10 @@ * Theme override for the content of an administrative block. * * Available variables: - * - content: List of administrative menu items. Each menu item contains: - * - link: Link to the admin section. - * - title: Short name of the section. - * - description: Description of the administrative menu item. - * - url: URI to the admin section. - * - options: URL options. See \Drupal\Core\Url::fromUri() for details. + * - 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', 'link_path', and 'localized_options', which are + * passed to l(). A 'description' key may also be provided. * - attributes: HTML attributes to be added to the element. * - compact: Boolean indicating whether compact mode is turned on or not. *