You are here

public function CartPane::view in Ubercart 8.4

Returns the contents of a checkout pane.

Parameters

\Drupal\uc_order\OrderInterface $order: The order that is being processed.

array $form: The checkout form array.

\Drupal\Core\Form\FormStateInterface $form_state: The checkout form state array.

Return value

array A form array, with an optional '#description' key to provide help text for the pane.

Overrides CheckoutPanePluginInterface::view

File

uc_cart/src/Plugin/Ubercart/CheckoutPane/CartPane.php, line 23

Class

CartPane
Displays the cart contents for review during checkout.

Namespace

Drupal\uc_cart\Plugin\Ubercart\CheckoutPane

Code

public function view(OrderInterface $order, array $form, FormStateInterface $form_state) {
  $build = [
    '#theme' => 'uc_cart_review_table',
    '#items' => $order->products,
  ];
  return $build;
}