function QuickEditController::attachments
Same name in other branches
- 8.9.x 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 199
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.