public function QuickEditController::attachments in Drupal 9
Same name and namespace in other branches
- 8 core/modules/quickedit/src/QuickEditController.php \Drupal\quickedit\QuickEditController::attachments()
Returns AJAX commands to load in-place editors' attachments.
Given a list of in-place editor IDs as POST parameters, render AJAX commands to load those in-place editors.
Return value
\Drupal\Core\Ajax\AjaxResponse The Ajax response.
1 string reference to 'QuickEditController::attachments'
- quickedit.routing.yml in core/
modules/ quickedit/ quickedit.routing.yml - core/modules/quickedit/quickedit.routing.yml
File
- core/
modules/ quickedit/ src/ QuickEditController.php, line 169
Class
- QuickEditController
- Returns responses for Quick Edit module routes.
Namespace
Drupal\quickeditCode
public function attachments(Request $request) {
$response = new AjaxResponse();
$editors = $request->request
->get('editors');
if (!isset($editors)) {
throw new NotFoundHttpException();
}
$response
->setAttachments($this->editorSelector
->getEditorAttachments($editors));
return $response;
}