You are here

function login_destination_help in Login Destination 8

Same name and namespace in other branches
  1. 8.2 login_destination.module \login_destination_help()
  2. 7 login_destination.module \login_destination_help()

Implements hook_help().

File

./login_destination.module, line 19
Control where users are directed to, once they login, register or logout.

Code

function login_destination_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.login_destination':
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Login Destination module allows you to customize the destination that the user is redirected to after logging in, registering to the site, using a one-time login link or logging out. The destination can be an internal page or an external URL. You may specify certain conditions like pages or user roles and make the destination depend upon them.') . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Creating login destinations') . '</dt>';
      $output .= '<dd>' . t('Users with sufficient permissions can create login destination through the !link. The page listing the login destinations provides an interface to add, edit and delete them', [
        '!link' => (string) \Drupal::l('Login destination page', Url::fromRoute('login_destination.list')),
      ]) . '</dd>';
      $output .= '<dt>' . t('Assigning destinations') . '</dt>';
      $output .= '<dd>' . t('You can add login destinations and specify the page where the user will be redirected when it logs in or logs out. You can also configure specific pages where the destination can work or not and select for what user roles the login destination applies') . '</dd>';
      $output .= '</dl>';
      return $output;
    case 'login_destination.list':
      $output = '<p>' . t('Login destination rules are evaluated each time a user logs in, registers to the site, uses a one-time login link or logs out. Each rule consists of the destination, path conditions and user roles conditions. First matching rule gets executed.') . '</p>';
      return $output;
  }
}