Commit 6c723737 authored by David Thompson's avatar David Thompson Committed by Mike Keran
Browse files

Issue #2728677 by dbt102: Add_BEF_HELP

parent cf5b153d
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -5,9 +5,31 @@
 * Views filters.
 */

use Drupal\Core\Url;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;

/**
 * Implements hook_help().
 */
function better_exposed_filters_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    // Main module help for the better_exposed_filters module.
    case 'help.page.better_exposed_filters':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Better Exposed Filters (BEF) modifies the use of Views by replacing the \'single\'  or \'multi\' <em>select boxes</em> with <em>radio buttons or checkboxes</em>. Views offers the ability to expose filters to the end user. When you expose a filter, you allow the user to interact with the view making it easy to build an advanced search.  Better Exposed Filters gives you greater control over the rendering of exposed filters. For more information, see the <a href=":online">online documentation for the Better Exposed Filters module</a>.', [':online' => 'https://www.drupal.org/node/766974']) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dt>' . t('Editing or Creating Views') . '</dt>';
      $output .= '<dd>' . t('Better Exposed Filters is used on <a href=":views">Views</a> that use an exposed filter.  Views filters are used to reduce the result set of a View to a manageable amount of data. BEF only operates on fields that have a limited number of options such as <a href=":node">Node</a>:Type or <a href=":taxonomy">Taxonomy</a>:TermID.', [':views' => Url::fromRoute('help.page', ['name' => 'views'])->toString(), ':node' => Url::fromRoute('help.page', ['name' => 'node'])->toString(), ':taxonomy' => (\Drupal::moduleHandler()->moduleExists('taxonomy')) ? Url::fromRoute('help.page', ['name' => 'taxonomy'])->toString() : '#']) . '</dd>';
      $output .= '<dt>' . t('Styling Better Exposed Filters') . '</dt>';
      $output .= '<dd>' . t('BEF provides some additional HTML structure to help you style your exposed filters. For some common examples see the <a href=":doco">online documentation</a>.', [':doco' => 'https://www.drupal.org/node/766974']) . '</dd>';
      return $output;
    break;
  }
}

/**
 * Implements hook_theme().
 */