You are here

function xmlsitemap_help in XML sitemap 8

Same name and namespace in other branches
  1. 5.2 xmlsitemap/xmlsitemap.module \xmlsitemap_help()
  2. 5 xmlsitemap.module \xmlsitemap_help()
  3. 6.2 xmlsitemap.module \xmlsitemap_help()
  4. 6 xmlsitemap.module \xmlsitemap_help()
  5. 7.2 xmlsitemap.module \xmlsitemap_help()
  6. 2.x xmlsitemap.module \xmlsitemap_help()

Implements hook_help().


./xmlsitemap.module, line 123
xmlsitemap XML sitemap


function xmlsitemap_help($route_name, RouteMatchInterface $route_match) {
  $output = '';
  switch ($route_name) {
    case '':
    case 'xmlsitemap.admin_settings':
    case 'xmlsitemap.entities_settings':
    case 'entity.xmlsitemap.edit_form':
    case 'entity.xmlsitemap.delete_form':
    case 'xmlsitemap.admin_search':
    case 'xmlsitemap.admin_search_list':
    case 'xmlsitemap.admin_rebuild':
      $output .= '<p>' . t("This action rebuilds your site's XML sitemap and regenerates the cached files, and may be a lengthy process. If you just installed XML sitemap, this can be helpful to import all your site's content into the sitemap. Otherwise, this should only be used in emergencies.") . '</p>';
  $currentUser = \Drupal::currentUser();
  if (strpos($route_name, 'xmlsitemap') !== FALSE && $currentUser
    ->hasPermission('administer xmlsitemap')) {

    // Alert the user to any potential problems detected by hook_requirements.
    $output .= _xmlsitemap_get_blurb();
  return $output;