function xmlsitemap_help in XML sitemap 8
Same name and namespace in other branches
- 5.2 xmlsitemap/xmlsitemap.module \xmlsitemap_help()
- 5 xmlsitemap.module \xmlsitemap_help()
- 6.2 xmlsitemap.module \xmlsitemap_help()
- 6 xmlsitemap.module \xmlsitemap_help()
- 7.2 xmlsitemap.module \xmlsitemap_help()
- 2.x xmlsitemap.module \xmlsitemap_help()
Implements hook_help().
File
- ./
xmlsitemap.module, line 123 - xmlsitemap XML sitemap
Code
function xmlsitemap_help($route_name, RouteMatchInterface $route_match) {
$output = '';
switch ($route_name) {
case 'help.page.xmlsitemap':
case 'xmlsitemap.admin_settings':
case 'xmlsitemap.entities_settings':
case 'entity.xmlsitemap.edit_form':
case 'entity.xmlsitemap.delete_form':
return;
case 'xmlsitemap.admin_search':
break;
case 'xmlsitemap.admin_search_list':
break;
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;
}