You are here

bootstrap_quicktabs.module in Bootstrap Quick Tabs 8

Same filename and directory in other branches
  1. 7 bootstrap_quicktabs.module

File

bootstrap_quicktabs.module
View source
<?php

/**
 * @file
 * Contains bootstrap_quicktabs.module.
 */
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function bootstrap_quicktabs_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // Main module help for the bootstrap_quicktabs module.
    case 'help.page.bootstrap_quicktabs':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Makes tabs from Bootstrap framework available to the Quicktabs module.') . '</p>';
      return $output;
    default:
  }
}

/**
 * Implements hook_theme().
 */
function bootstrap_quicktabs_theme() {
  return [
    'bootstrap_tabs' => [
      'variables' => [
        'content' => NULL,
        'tabs' => NULL,
        'options' => NULL,
      ],
      'template' => 'bootstrap-tabs',
    ],
    'bootstrap_tabs_tabs' => [
      'template' => 'bootstrap-tabs-tabs',
    ],
    'bootstrap_accordion' => [
      'variables' => [
        'classes' => NULL,
        'id' => NULL,
        'panels' => NULL,
      ],
      'template' => 'bootstrap-accordion',
    ],
  ];
}

Functions