function AnnouncementsFeedHooks::help

Implements hook_help().

File

core/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php, line 18

Class

AnnouncementsFeedHooks
Hook implementations for announcements_feed.

Namespace

Drupal\announcements_feed\Hook

Code

public function help($route_name, RouteMatchInterface $route_match) {
    switch ($route_name) {
        case 'help.page.announcements_feed':
            $output = '';
            $output .= '<h2>' . t('About') . '</h2>';
            $output .= '<p>' . 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>' . t('Uses') . '</h2>';
            $output .= '<dl><dt>' . t('Accessing announcements') . '</dt>';
            $output .= '<dd>' . 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(t('Announcements'), 'announcements_feed.announcement')->toString(),
            ]) . '</dd>';
            $output .= '</dl>';
            return $output;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.