You are here

function better_exposed_filters_help in Better Exposed Filters 8.4

Same name and namespace in other branches
  1. 8.5 better_exposed_filters.module \better_exposed_filters_help()
  2. 8.3 better_exposed_filters.module \better_exposed_filters_help()

Implements hook_help().

File

./better_exposed_filters.module, line 19
General functions and hook implementations.

Code

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;
  }
}