You are here

function linkit_help in Linkit 8.5

Same name and namespace in other branches
  1. 8.4 linkit.module \linkit_help()
  2. 7.2 linkit.module \linkit_help()

Implements hook_help().

File

./linkit.module, line 15
Linkit hook implementations.

Code

function linkit_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.linkit':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Linkit module provides an easy interface for internal and external linking with wysiwyg editors by using an autocomplete field.') . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Managing Linkit profiles') . '</dt>';
      $output .= '<dd>' . t('You can create and edit Linkit profiles on the <a href=":profiles">Linkit profile page</a>. You can create a Linkit profile by clicking "<a href=":add_profile">Add profile</a>".', [
        ':profiles' => Url::fromRoute('entity.linkit_profile.collection')
          ->toString(),
        ':add_profile' => Url::fromRoute('entity.linkit_profile.add_form')
          ->toString(),
      ]) . '</dd>';
      $output .= '</dl>';
      return $output;
    case 'entity.linkit_profile.collection':
      $output = '<p>' . t('Linkit profiles define how Linkit will operate on fields that have Linkit attached.') . '</p>';
      $output .= '<p>' . t('The most common way to use Linkit is to enable Linkit on the Drupal Link plugin and associate a Linkit profile to it on a Text format.') . '</p>';
      return $output;
    case 'linkit.matchers':
      $output = '<p>' . t('Matchers defines how different data can be queried and displayed in the autocomplete suggestion list. Multiple matchers of the same type can be used at the same time to granulate the suggestions. The order of the added matchers defines in which order the suggestions will be presented.') . '</p>';
      return $output;
  }
}