You are here

public function ShipTo::buildForm in Ubercart 8.4

Form constructor.

Parameters

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

array $form: An array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides AddressPaneBase::buildForm

File

uc_order/src/Plugin/Ubercart/OrderPane/ShipTo.php, line 31

Class

ShipTo
Manage the order's shipping address and contact information.

Namespace

Drupal\uc_order\Plugin\Ubercart\OrderPane

Code

public function buildForm(OrderInterface $order, array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($order, $form, $form_state);
  $form['copy-address-image']['#attributes'] = [
    'id' => 'copy-billing-to-shipping',
  ];
  $form['copy-address-image']['#title'] = $this
    ->t('Copy billing information.');
  $form['copy-address-image']['#alt'] = $this
    ->t('Copy billing information.');
  return $form;
}