function hook_views_ui_display_top_alter
Same name in other branches
- 9 core/modules/views_ui/views_ui.api.php \hook_views_ui_display_top_alter()
- 8.9.x core/modules/views_ui/views_ui.api.php \hook_views_ui_display_top_alter()
- 11.x core/modules/views_ui/views_ui.api.php \hook_views_ui_display_top_alter()
Alter the top of the display for the Views UI.
This hook can be implemented by themes.
@todo Until https://www.drupal.org/project/drupal/issues/3087455 is resolved, use this hook or hook_views_ui_display_tab_alter() instead of hook_form_view_edit_form_alter().
Parameters
array[] $build: Render array for the display top.
\Drupal\views_ui\ViewUI $view: The view being edited.
string $display_id: The display ID.
See also
\Drupal\views_ui\ViewUI::renderDisplayTop()
Related topics
2 functions implement hook_views_ui_display_top_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- claro_views_ui_display_top_alter in core/
themes/ claro/ claro.theme - Implements hook_views_ui_display_top_alter().
- views_ui_test_theme_views_ui_display_top_alter in core/
modules/ views_ui/ tests/ themes/ views_ui_test_theme/ views_ui_test_theme.theme - Implements hook_views_ui_display_top_alter().
1 invocation of hook_views_ui_display_top_alter()
- ViewEditForm::renderDisplayTop in core/
modules/ views_ui/ src/ ViewEditForm.php - Render the top of the display so it can be updated during ajax operations.
File
-
core/
modules/ views_ui/ views_ui.api.php, line 31
Code
function hook_views_ui_display_top_alter(&$build, \Drupal\views_ui\ViewUI $view, $display_id) {
$build['custom']['#markup'] = 'This text should always appear';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.