class AnnouncementsFeedHelpHooks
Help hook implementations for announcements_feed.
Hierarchy
- class \Drupal\announcements_feed\Hook\AnnouncementsFeedHelpHooks uses \Drupal\Core\StringTranslation\StringTranslationTrait
Expanded class hierarchy of AnnouncementsFeedHelpHooks
File
-
core/
modules/ announcements_feed/ src/ Hook/ AnnouncementsFeedHelpHooks.php, line 13
Namespace
Drupal\announcements_feed\HookView source
class AnnouncementsFeedHelpHooks {
use StringTranslationTrait;
/**
* Implements hook_help().
*/
public function help($route_name, RouteMatchInterface $route_match) : ?string {
switch ($route_name) {
case 'help.page.announcements_feed':
$output = '';
$output .= '<h2>' . $this->t('About') . '</h2>';
$output .= '<p>' . $this->t('The Announcements module displays announcements from the Drupal community. For more information, see the <a href=":documentation">online documentation for the Announcements module</a>.', [
':documentation' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/announcements-feed',
]) . '</p>';
$output .= '<h2>' . $this->t('Uses') . '</h2>';
$output .= '<dl><dt>' . $this->t('Accessing announcements') . '</dt>';
$output .= '<dd>' . $this->t('Users with the "View drupal.org announcements" permission may click on the "Announcements" item in the administration toolbar, or access @link, to see all announcements relevant to the Drupal version of your site.', [
'@link' => Link::createFromRoute($this->t('Announcements'), 'announcements_feed.announcement')
->toString(),
]) . '</dd>';
$output .= '</dl>';
return $output;
}
return NULL;
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary | Overrides |
|---|---|---|---|---|
| AnnouncementsFeedHelpHooks::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.