You are here

function modal_page_help in Modal 8.3

Same name and namespace in other branches
  1. 8 modal_page.module \modal_page_help()
  2. 8.2 modal_page.module \modal_page_help()
  3. 5.0.x modal_page.module \modal_page_help()
  4. 4.0.x modal_page.module \modal_page_help()
  5. 4.1.x modal_page.module \modal_page_help()

Implements hook_help().

File

./modal_page.module, line 161
Main file for the Modal Page.

Code

function modal_page_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.modal_page':
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Modal Page is the easiest and fastest way to put a modal on specific pages. For more information, see the online handbook entry for <a target="_blank" href="@modal_page">Modal Page</a>.', [
        '@modal_page' => 'https://www.drupal.org/project/modal_page',
      ]) . '</p>';
      $output .= '<h3>' . t('Usage') . '</h3>';
      $output .= '<p>' . t('You only need to configure the modal text and on which page it should appear. When someone visits this page, this modal will be displayed.') . '</p>';
      $output .= '<dl>';
      $output .= '<h3>' . t('Displaying modals') . '</h3>';
      $output .= '<p>' . t('The configuration page of Modal Page can be accessed in <i>Structure</i>  » <i>Modal</i> screen. When followed the correct pattern, the modal can be displayed on screen very easily.') . '</p>';
      $output .= '<p>' . t('<a href="@modal_page_configuration">Click here</a> to redirect to Modal Page configuration.', [
        '@modal_page_configuration' => \Drupal::urlGenerator()
          ->generateFromRoute('modal_page.settings'),
      ]) . '</p>';
      return $output;
  }
}