QuickEditController::attachments

public QuickEditController::attachments(Request $request)

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.

File

core/modules/quickedit/src/QuickEditController.php, line 145

Class

QuickEditController
Returns responses for Quick Edit module routes.

Namespace

Drupal\quickedit

Code

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;
}
doc_Drupal
2016-10-29 09:36:09
Comments
Leave a Comment

Please login to continue.