function history_help

Same name in other branches
  1. 9 core/modules/history/history.module \history_help()
  2. 10 core/modules/history/history.module \history_help()

Implements hook_help().

File

core/modules/history/history.module, line 30

Code

function history_help($route_name, RouteMatchInterface $route_match) {
    switch ($route_name) {
        case 'help.page.history':
            $output = '<h3>' . t('About') . '</h3>';
            $output .= '<p>' . t('The History module keeps track of which content a user has read. It marks content as <em>new</em> or <em>updated</em> depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered <em>read</em>. The History module does not have a user interface but it provides a filter to <a href=":views-help">Views</a> to show new or updated content. For more information, see the <a href=":url">online documentation for the History module</a>.', [
                ':views-help' => \Drupal::moduleHandler()->moduleExists('views') ? Url::fromRoute('help.page', [
                    'name' => 'views',
                ])->toString() : '#',
                ':url' => 'https://www.drupal.org/documentation/modules/history',
            ]) . '</p>';
            return $output;
    }
}

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