rename_admin_paths.module in Rename Admin Paths 8
Same filename and directory in other branches
Allows users to rename admin paths.
File
rename_admin_paths.moduleView source
<?php
/**
* @file
* Allows users to rename admin paths.
*/
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Link;
use Drupal\Core\Url;
/**
* Implements hook_help().
*/
function rename_admin_paths_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.rename_admin_paths':
$output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Rename admin paths module allows users to rename admin paths (/admin/..) to /something/... and (/user/..) to /something_else/...') . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl><dt>' . t('Rename admin paths') . '</dt>';
$output .= '<dd>' . t('Choose how to rename admin paths by using') . ' ' . Link::fromTextAndUrl(t('Path admin configuration'), Url::fromRoute('rename_admin_paths.admin'))
->toString() . '</dd>';
$output .= '</dl>';
return $output;
case 'rename_admin_paths.admin':
$output = '<p>' . t('Configure how to rename admin paths.') . '</p>';
return $output;
}
}
Functions
Name | Description |
---|---|
rename_admin_paths_help | Implements hook_help(). |