class ExperimentalModuleTestHooks
Hook implementations for experimental_module_test.
Hierarchy
- class \Drupal\experimental_module_test\Hook\ExperimentalModuleTestHooks uses \Drupal\Core\StringTranslation\StringTranslationTrait
Expanded class hierarchy of ExperimentalModuleTestHooks
File
-
core/
modules/ system/ tests/ modules/ experimental_module_test/ src/ Hook/ ExperimentalModuleTestHooks.php, line 14
Namespace
Drupal\experimental_module_test\HookView source
class ExperimentalModuleTestHooks {
use StringTranslationTrait;
/**
* Implements hook_help().
*/
public function help($route_name, RouteMatchInterface $route_match) : ?\Stringable {
switch ($route_name) {
case 'help.page.experimental_module_test':
// Make the help text conform to core standards.
return $this->t('The Experimental Test module is not done yet. It may eat your data, but you can read the <a href=":url">online documentation for the Experimental Test module</a>.', [
':url' => 'http://www.example.com',
]);
}
return NULL;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ExperimentalModuleTestHooks::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.