You are here

function like_and_dislike_help in Like & Dislike 8

Implements hook_help().

File

./like_and_dislike.module, line 17
This module provides 2 voting widgets: Like and Dislike.

Code

function like_and_dislike_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // Main module help for the 'Like & Dislike' module.
    case 'help.page.like_and_dislike':
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('"This module provides "like" and "dislike" widgets for contents inside Drupal, making it easiers to promote features as the one seem on many social network websites.') . '</p>';
      $output .= '<p>' . t('Technically speaking, the module provides 2 tags for Voting API, "like" and "dislike", working in a different way from Vote Up/Down, that is like a "plus or minus" approach. Likes are separate from Dislikes here.') . '</p>';
      $output .= '<h3>' . t('How it works') . '</h3>';
      $output .= '<p>' . t('Like/Dislike widget works for any Entity Types and Bundles, and includes a settings page to specify on which bundles the user wants the widgets available(node types, comments, files, users, etc). By default, none of them are available, so it is needed to go to "<a href=:like_dislike_settings>:like_dislike_settings</a>" and enable the wanted ones.', [
        ':like_dislike_settings' => Url::fromRoute('like_and_dislike.admin_settings')
          ->toString(),
      ]) . '</p>';
      return $output;
  }
}