You are here

public function AddressPaneBase::view in Ubercart 8.4

Same name in this branch
  1. 8.4 uc_order/src/Plugin/Ubercart/OrderPane/AddressPaneBase.php \Drupal\uc_order\Plugin\Ubercart\OrderPane\AddressPaneBase::view()
  2. 8.4 uc_cart/src/Plugin/Ubercart/CheckoutPane/AddressPaneBase.php \Drupal\uc_cart\Plugin\Ubercart\CheckoutPane\AddressPaneBase::view()

Returns the contents of an order pane as a store administrator.

Parameters

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

string $view_mode: The view mode that is being used to render the order.

Return value

array A render array showing order data.

Overrides OrderPanePluginInterface::view

1 call to AddressPaneBase::view()
ShipTo::view in uc_order/src/Plugin/Ubercart/OrderPane/ShipTo.php
Returns the contents of an order pane as a store administrator.
1 method overrides AddressPaneBase::view()
ShipTo::view in uc_order/src/Plugin/Ubercart/OrderPane/ShipTo.php
Returns the contents of an order pane as a store administrator.

File

uc_order/src/Plugin/Ubercart/OrderPane/AddressPaneBase.php, line 24

Class

AddressPaneBase
Provides a generic address pane that can be extended as required.

Namespace

Drupal\uc_order\Plugin\Ubercart\OrderPane

Code

public function view(OrderInterface $order, $view_mode) {
  $pane = $this->pluginDefinition['id'];
  $address = $order
    ->getAddress($pane);
  return [
    '#markup' => $address . '<br />' . $address
      ->getPhone(),
  ];
}