public EditorSelector::getEditorAttachments(array $editor_ids)
Returns the attachments for all editors.
Parameters
array $editor_ids: A list of all in-place editor IDs that should be attached.
Return value
array An array of attachments, for use with #attached.
Overrides EditorSelectorInterface::getEditorAttachments
See also
\Drupal\Core\Render\AttachmentsResponseProcessorInterface::processAttachments()
File
- core/modules/quickedit/src/EditorSelector.php, line 88
Class
- EditorSelector
- Selects an in-place editor (an InPlaceEditor plugin) for a field.
Namespace
Drupal\quickedit
Code
1 2 3 4 5 6 7 8 9 10 11 12 | public function getEditorAttachments( array $editor_ids ) { $attachments = array (); $editor_ids = array_unique ( $editor_ids ); // Editor plugins' attachments. foreach ( $editor_ids as $editor_id ) { $editor = $this ->editorManager->createInstance( $editor_id ); $attachments [] = $editor ->getAttachments(); } return NestedArray::mergeDeepArray( $attachments ); } |
Please login to continue.