You are here

public function EditorPluginInterface::getLibraries in Drupal 8

Same name and namespace in other branches
  1. 9 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()

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()
BcEditor::getLibraries in core/modules/editor/tests/src/Unit/EditorBaseTest.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/src/Plugin/Editor/TRexEditor.php
Returns libraries to be attached.
UnicornEditor::getLibraries in core/modules/editor/tests/modules/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);