Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SystemHooks.php

function SystemHooks::libraryInfoAlter

Implements hook_library_info_alter().

File

core/modules/system/src/Hook/SystemHooks.php, line 415

Class

SystemHooks
Hook implementations for system.

Namespace

Drupal\system\Hook

Code

public function libraryInfoAlter(&$libraries, $extension) : void {
    // If Claro is the admin theme but not the active theme, grant Claro the
    // ability to override the toolbar library with its own assets.
    if ($extension === 'toolbar' && _system_is_claro_admin_and_not_active()) {
        require_once DRUPAL_ROOT . '/core/themes/claro/claro.theme';
        claro_system_module_invoked_library_info_alter($libraries, $extension);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal