You are here

function jcarousel_help in jCarousel 8.4

Same name and namespace in other branches
  1. 8.5 jcarousel.module \jcarousel_help()
  2. 8.3 jcarousel.module \jcarousel_help()
  3. 6.2 jcarousel.module \jcarousel_help()
  4. 6 jcarousel.module \jcarousel_help()
  5. 7.3 jcarousel.module \jcarousel_help()
  6. 7.2 jcarousel.module \jcarousel_help()

Implements hook_help().

File

./jcarousel.module, line 17
Provides integration with 3rd party modules and the jCarousel library.

Code

function jcarousel_help($route_name, RouteMatchInterface $route_match) {
  $output = '';
  switch ($route_name) {
    case 'help.page.jcarousel':
      $renderer = \Drupal::service('renderer');
      $build = [];
      $build[] = [
        '#type' => 'html_tag',
        '#tag' => 'p',
        '#value' => t('The jCarousel module provides the ability to create carousel-style lists such as those included on this page. The jCarousel module includes integrations with other Drupal modules, but may also be used manually within your own theme or custom modules. It does not include any site-wide settings page or options, each carousel is separately configured.'),
      ];
      $build['views'] = _jcarousel_help_views();
      $build[] = [
        '#type' => 'html_tag',
        '#tag' => 'h2',
        '#value' => t('Custom implementations'),
      ];
      $build[] = [
        '#type' => 'html_tag',
        '#tag' => 'p',
        '#value' => t("The following are demonstrations of jCarousel module when used directly by another module or your theme. <strong>Most users do not need to manually code carousels</strong> (building carousels using Views is the most common approach), but these demonstrations provide good examples of jCarousel's abilities."),
      ];
      $build['simple'] = _jcarousel_help_simple();
      $build['vertical'] = _jcarousel_help_vertical();
      $build['skins'] = _jcarousel_help_skins();
      $build['events'] = _jcarousel_help_events();
      $build['backward'] = _jcarousel_help_backward_compatibility();
      $output .= $renderer
        ->render($build);
      break;
  }
  return $output;
}