public function UnicornEditor::getLibraries in Drupal 10
Same name and namespace in other branches
- 8 core/modules/editor/tests/modules/src/Plugin/Editor/UnicornEditor.php \Drupal\editor_test\Plugin\Editor\UnicornEditor::getLibraries()
- 9 core/modules/editor/tests/modules/src/Plugin/Editor/UnicornEditor.php \Drupal\editor_test\Plugin\Editor\UnicornEditor::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.
Overrides EditorPluginInterface::getLibraries
See also
\Drupal\Core\Render\AttachmentsResponseProcessorInterface::processAttachments()
EditorManager::getAttachments()
File
- core/
modules/ editor/ tests/ modules/ src/ Plugin/ Editor/ UnicornEditor.php, line 60
Class
- UnicornEditor
- Defines a Unicorn-powered text editor for Drupal (for testing purposes).
Namespace
Drupal\editor_test\Plugin\EditorCode
public function getLibraries(Editor $editor) {
return [
'editor_test/unicorn',
];
}