You are here

function hook_page_top in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Render/theme.api.php \hook_page_top()

Add a renderable array to the top of the page.

Parameters

array $page_top: A renderable array representing the top of the page.

Related topics

5 functions implement hook_page_top()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

block_page_top in core/modules/block/block.module
Implements hook_page_top().
language_test_page_top in core/modules/language/tests/language_test/language_test.module
Implements hook_page_top().
node_page_top in core/modules/node/node.module
Implements hook_page_top().
toolbar_page_top in core/modules/toolbar/toolbar.module
Implements hook_page_top().
update_page_top in core/modules/update/update.module
Implements hook_page_top().
1 invocation of hook_page_top()
HtmlRenderer::buildPageTopAndBottom in core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php
Invokes the page top and bottom hooks.

File

core/lib/Drupal/Core/Render/theme.api.php, line 1017
Hooks and documentation related to the theme and render system.

Code

function hook_page_top(array &$page_top) {
  $page_top['mymodule'] = [
    '#markup' => 'This is the top.',
  ];
}