public function LineItems::ajaxCallback in Ubercart 8.4
AJAX callback to render the line items.
File
- uc_order/
src/ Plugin/ Ubercart/ OrderPane/ LineItems.php, line 204
Class
- LineItems
- View and modify an order's line items.
Namespace
Drupal\uc_order\Plugin\Ubercart\OrderPaneCode
public function ajaxCallback($form, FormStateInterface $form_state) {
$response = new AjaxResponse();
$response
->addCommand(new ReplaceCommand('#order-line-items', trim(drupal_render($form['line_items']))));
$status_messages = [
'#type' => 'status_messages',
];
$response
->addCommand(new PrependCommand('#order-line-items', drupal_render($status_messages)));
return $response;
}