You are here

public function Other::orderEditDetails in Ubercart 8.4

Called when an order is being edited with this payment method.

Parameters

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

Return value

array A form array.

Overrides PaymentMethodPluginBase::orderEditDetails

File

payment/uc_payment_pack/src/Plugin/Ubercart/PaymentMethod/Other.php, line 34

Class

Other
Defines a generic payment method.

Namespace

Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethod

Code

public function orderEditDetails(OrderInterface $order) {
  $build = [];
  $build['description'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Description'),
    '#default_value' => isset($order->payment_details['description']) ? $order->payment_details['description'] : '',
    '#size' => 32,
    '#maxlength' => 64,
  ];
  return $build;
}