function ToolbarHooks::help
Same name and namespace in other branches
- 11.x core/modules/toolbar/src/Hook/ToolbarHooks.php \Drupal\toolbar\Hook\ToolbarHooks::help()
Implements hook_help().
Attributes
#[Hook('help')]
File
-
core/
modules/ toolbar/ src/ Hook/ ToolbarHooks.php, line 35
Class
- ToolbarHooks
- Hook implementations for toolbar.
Namespace
Drupal\toolbar\HookCode
public function help($route_name, RouteMatchInterface $route_match) : ?string {
switch ($route_name) {
case 'help.page.toolbar':
$output = '<h2>' . $this->t('About') . '</h2>';
$output .= '<p>' . $this->t('The Toolbar module provides a toolbar for site administrators to navigate the menu system to find pages for administrative tasks. The menu displays tabs and trays provided by the Toolbar module itself and other modules. The toolbar displays on the top or left side of the page (right side in right-to-left languages).') . '</p>';
$output .= '<p>' . $this->t('If you have the Announcements module enabled, you will see a direct link to announcements in the toolbar.') . '</p>';
$output .= '<p>' . $this->t('For more information, see the <a href=":toolbar_docs">online documentation for the Toolbar module</a>.', [
':toolbar_docs' => 'https://www.drupal.org/docs/8/core/modules/toolbar',
]) . '</p>';
$output .= '<h4>' . $this->t('Terminology') . '</h4>';
$output .= '<dl>';
$output .= '<dt>' . $this->t('Tabs') . '</dt>';
$output .= '<dd>' . $this->t('Tabs are buttons, displayed in a bar across the top of the screen. Some tabs execute an action (such as starting Edit mode), while other tabs toggle which tray is open.') . '</dd>';
$output .= '<dt>' . $this->t('Trays') . '</dt>';
$output .= '<dd>' . $this->t('Trays are usually lists of links, which can be hierarchical like a menu. If a tray has been toggled open, it is displayed either vertically or horizontally below the tab bar, depending on the browser width. Only one tray may be open at a time. If you click another tab, that tray will replace the tray being displayed. In wide browser widths, the user has the ability to toggle from vertical to horizontal, using a link at the bottom or right of the tray. Hierarchical menus only have open/close behavior in vertical mode; if you display a tray containing a hierarchical menu horizontally, only the top-level links will be available.') . '</dd>';
$output .= '</dl>';
return $output;
}
return NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.