class NavigationTopBarHooks
Hook implementations for navigation_top_bar.
Hierarchy
- class \Drupal\navigation_top_bar\Hook\NavigationTopBarHooks uses \Drupal\Core\StringTranslation\StringTranslationTrait
Expanded class hierarchy of NavigationTopBarHooks
File
-
core/
modules/ navigation/ modules/ navigation_top_bar/ src/ Hook/ NavigationTopBarHooks.php, line 12
Namespace
Drupal\navigation_top_bar\HookView source
class NavigationTopBarHooks {
use StringTranslationTrait;
/**
* Implements hook_help().
*/
public function help($route_name, RouteMatchInterface $route_match) : ?string {
switch ($route_name) {
case 'help.page.navigation_top_bar':
$output = '<h2>' . $this->t('About') . '</h2>';
$output .= '<p>' . $this->t('The Navigation Top Bar module is a Feature Flag module which, when enabled, renders the experimental navigation top bar.') . '</p>';
$output .= '<p>' . $this->t('The top bar provides relevant administrative information and tasks for the current page. It is not feature complete nor fully functional.') . '</p>';
$output .= '<p>' . $this->t('Leaving this module enabled can affect both admin and front-end pages layouts and blocks like Primary admin actions, whose content might be moved to te top bar.') . '</p>';
$output .= '<p>' . $this->t('It is recommended to leave this module off while it is under active development and experimental phase.') . '</p>';
$output .= '<p>' . $this->t('For more information, see the <a href=":docs">online documentation for the Navigation Top Bar module</a>.', [
':docs' => 'https://www.drupal.org/project/navigation',
]) . '</p>';
return $output;
}
return NULL;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
NavigationTopBarHooks::help | public | function | Implements hook_help(). | |
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 |
StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | |
StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | |
StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.