You are here

function views_slideshow_cycle_help in Views Slideshow 8.4

Same name and namespace in other branches
  1. 8.3 modules/views_slideshow_cycle/views_slideshow_cycle.module \views_slideshow_cycle_help()
  2. 6.3 contrib/views_slideshow_cycle/views_slideshow_cycle.module \views_slideshow_cycle_help()
  3. 7.3 contrib/views_slideshow_cycle/views_slideshow_cycle.module \views_slideshow_cycle_help()

Implements hook_help().

File

modules/views_slideshow_cycle/views_slideshow_cycle.module, line 15
Views Slideshow: cycle is typically used for field views.

Code

function views_slideshow_cycle_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.views_slideshow_cycle':
      if (\Drupal::moduleHandler()
        ->moduleExists('advanced_help')) {
        $output = '<p>' . Link::fromTextAndUrl(t('Click here to view the documentation for Views Slideshow Cycle.'), Url::fromRoute('advanced_help.module_index', [
          'module' => 'views_slideshow_cycle',
        ])
          ->toString()) . '</p>';
      }
      else {
        $output = '<p>' . t('Views Slideshow Cycle help can be found by installing and enabling the @advanced_help', [
          '@advanced_help' => Link::fromTextAndUrl(t('Advanced Help module'), Url::fromUri('http://drupal.org/project/advanced_help'))
            ->toString(),
        ]) . '</p>';
      }
      return $output;
  }
}