You are here

ckeditor_bootstrap_tabs.module in CKEditor Bootstrap Tabs 8

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

CKEditor tabs module.

File

ckeditor_bootstrap_tabs.module
View source
<?php

use Drupal\Core\Installer\InstallerKernel;

/**
 * @file
 * CKEditor tabs module.
 */

/**
 * Implements hook_page_attachments().
 *
 * Use Libraries API to load the js & css files into header.
 */
function ckeditor_bootstrap_tabs_page_attachments(array &$page) {

  // Don't add the JavaScript and CSS during installation.
  if (function_exists('drupal_installation_attempted')) {
    if (drupal_installation_attempted()) {
      return;
    }
  }
  else {
    if (InstallerKernel::installationAttempted()) {
      return;
    }
  }
  $page['#attached']['library'][] = 'ckeditor_bootstrap_tabs/tabs';
}