View source
<?php
use Drupal\Core\Url;
use Drupal\Core\Routing\RouteMatchInterface;
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':
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(),
]);
}
}