You are here

function robotstxt_help in RobotsTxt 8

Same name and namespace in other branches
  1. 5 robotstxt.module \robotstxt_help()
  2. 6 robotstxt.module \robotstxt_help()
  3. 7 robotstxt.module \robotstxt_help()

Implements hook_help().

File

./robotstxt.module, line 9

Code

function robotstxt_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.robotstxt':
      return '<p>' . t('In a multisite environment, there is no mechanism for having a separate robots.txt file for each site. This module addresses that need by letting you administer the robots.txt file from the settings interface.') . '</p>';
    case 'robotstxt.admin_settings_form':

      // Use base_path() or we may get an URL like "/en/robots.txt" and
      // "/de/robots.txt" on sites with URL language negotiation.
      return t('See <a href="http://www.robotstxt.org/">http://www.robotstxt.org/</a> for more information concerning how to write your <a href=":robotstxt">robots.txt</a> file.', [
        ':robotstxt' => Url::fromUri('base://robots.txt')
          ->toString(),
      ]);
  }
}