ShipTo.php in Ubercart 8.4
File
uc_order/src/Plugin/Ubercart/OrderPane/ShipTo.php
View source
<?php
namespace Drupal\uc_order\Plugin\Ubercart\OrderPane;
use Drupal\Core\Form\FormStateInterface;
use Drupal\uc_order\OrderInterface;
class ShipTo extends AddressPaneBase {
public function view(OrderInterface $order, $view_mode) {
if ($view_mode != 'customer' || $order
->isShippable()) {
return parent::view($order, $view_mode);
}
}
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;
}
}
Classes
Name |
Description |
ShipTo |
Manage the order's shipping address and contact information. |