diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 0061e12..95b243f 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -541,7 +541,7 @@ function template_preprocess_block(&$variables) { $variables['block']->label_hidden = $variables['block']->label; $variables['block']->label = ''; } - $variables['label'] = check_plain($variables['elements']['#block']->label); + $variables['label'] = check_plain($variables['block']->label); // All blocks get an independent counter for each region. if (!isset($block_counter[$variables['block']->region])) { diff --git a/core/modules/block/templates/block.html.twig b/core/modules/block/templates/block.html.twig index 37e316b..c1453bd 100644 --- a/core/modules/block/templates/block.html.twig +++ b/core/modules/block/templates/block.html.twig @@ -4,22 +4,22 @@ * Default theme implementation to display a block. * * Available variables: - * - label: Block title. - * - block.label_hidden: The hidden block title value if the block was - * configured to hide the title ('label' is empty in this case). + * - label: The block title. + * - block - The full block entity. + * - block.label_hidden: The hidden block title value if the block was + * configured to hide the title ('label' is empty in this case). + * - block.module: The module that generated the block. + * - block.delta: An ID for the block, unique within each module. + * - block.region: The block region embedding the current block. * - contents: The contents of this block. * - attributes: Remaining HTML attributes for the containing element. * - attributes.id: A valid HTML ID and guaranteed unique. * - attributes.class: Classes that can be used to style contextually through - * CSS. These can be manipulated through from preprocess functions. The - * default values can be one or more of the following: - * - block: The current template type, i.e., "theming hook". + * CSS. These can be manipulated through preprocess functions. The default + * values can be one or more of the following: * - block-[module]: The module generating the block. For example, the user * module is responsible for handling the default user navigation block. In * that case the class would be 'block-user'. - * - block.module: Module that generated the block. - * - block.delta: An ID for the block, unique within each module. - * - block.region: The block region embedding the current block. * * Helper variables: * - block_id: Counter dependent on each block region. @@ -28,8 +28,6 @@ * - logged_in: Flags true when the current user is a logged-in member. * - is_admin: Flags true when the current user is an administrator. * - * @todo Update include path once http://drupal.org/node/1777532 is resolved. - * * @see template_preprocess() * @see template_preprocess_block() *