function TextWithSummaryHooks::libraryInfoAlter

Implements hook_library_info_alter().

@todo remove hook when moved to contrib and text/drupal.text is deleted.

Attributes

#[Hook('library_info_alter')]

File

core/modules/text_with_summary/src/Hook/TextWithSummaryHooks.php, line 77

Class

TextWithSummaryHooks
Hook implementations for text_with_summary.

Namespace

Drupal\text_with_summary\Hook

Code

public function libraryInfoAlter(array &$libraries, string $extension) : void {
  if ($extension === 'text' && isset($libraries['drupal.text'])) {
    $libraries['drupal.text']['js'] = [];
    $libraries['drupal.text']['dependencies'][] = 'text_with_summary/drupal.text';
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.