You are here

public function CKEditor5PluginDefinition::getAdminLibrary in Drupal 10

Gets the asset library this plugin needs to be loaded on the admin UI.

Return value

string An asset library ID.

Throws

\LogicException When called on a plugin definition that has no admin library.

See also

\Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin::$admin_library

File

core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php, line 426

Class

CKEditor5PluginDefinition
Provides an implementation of a CKEditor 5 plugin definition.

Namespace

Drupal\ckeditor5\Plugin

Code

public function getAdminLibrary() : string {
  if (!$this
    ->hasAdminLibrary()) {
    throw new \LogicException('::getAdminLibrary() should only be called if ::hasAdminLibrary() returns TRUE.');
  }
  return $this->drupal['admin_library'];
}