Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/quickedit/src/QuickEditController.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
219 $response->addCommand(new FieldFormCommand($output)); | 219 $response->addCommand(new FieldFormCommand($output)); |
220 | 220 |
221 $errors = $form_state->getErrors(); | 221 $errors = $form_state->getErrors(); |
222 if (count($errors)) { | 222 if (count($errors)) { |
223 $status_messages = [ | 223 $status_messages = [ |
224 '#type' => 'status_messages' | 224 '#type' => 'status_messages', |
225 ]; | 225 ]; |
226 $response->addCommand(new FieldFormValidationErrorsCommand($this->renderer->renderRoot($status_messages))); | 226 $response->addCommand(new FieldFormValidationErrorsCommand($this->renderer->renderRoot($status_messages))); |
227 } | 227 } |
228 } | 228 } |
229 | 229 |
291 | 291 |
292 // Return information about the entity that allows a front end application | 292 // Return information about the entity that allows a front end application |
293 // to identify it. | 293 // to identify it. |
294 $output = [ | 294 $output = [ |
295 'entity_type' => $entity->getEntityTypeId(), | 295 'entity_type' => $entity->getEntityTypeId(), |
296 'entity_id' => $entity->id() | 296 'entity_id' => $entity->id(), |
297 ]; | 297 ]; |
298 | 298 |
299 // Respond to client that the entity was saved properly. | 299 // Respond to client that the entity was saved properly. |
300 $response = new AjaxResponse(); | 300 $response = new AjaxResponse(); |
301 $response->addCommand(new EntitySavedCommand($output)); | 301 $response->addCommand(new EntitySavedCommand($output)); |