function EditorPluginInterface::getLibraries

Same name in other branches
  1. 8.9.x core/modules/editor/src/Plugin/EditorPluginInterface.php \Drupal\editor\Plugin\EditorPluginInterface::getLibraries()
  2. 10 core/modules/editor/src/Plugin/EditorPluginInterface.php \Drupal\editor\Plugin\EditorPluginInterface::getLibraries()
  3. 11.x core/modules/editor/src/Plugin/EditorPluginInterface.php \Drupal\editor\Plugin\EditorPluginInterface::getLibraries()

Returns libraries to be attached.

Because this is a method, plugins can dynamically choose to attach a different library for different configurations, instead of being forced to always use the same method.

Parameters

\Drupal\editor\Entity\Editor $editor: A configured text editor object.

Return value

array An array of libraries that will be added to the page for use by this text editor.

See also

\Drupal\Core\Render\AttachmentsResponseProcessorInterface::processAttachments()

EditorManager::getAttachments()

4 methods override EditorPluginInterface::getLibraries()
CKEditor5::getLibraries in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
Returns libraries to be attached.
CKEditor::getLibraries in core/modules/ckeditor/src/Plugin/Editor/CKEditor.php
Returns libraries to be attached.
TRexEditor::getLibraries in core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/TRexEditor.php
Returns libraries to be attached.
UnicornEditor::getLibraries in core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php
Returns libraries to be attached.

File

core/modules/editor/src/Plugin/EditorPluginInterface.php, line 73

Class

EditorPluginInterface
Defines an interface for configurable text editors.

Namespace

Drupal\editor\Plugin

Code

public function getLibraries(Editor $editor);

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