Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function submitForm(OrderInterface $order, array &$form, FormStateInterface $form_state)
 {
     $pane = $this->pluginDefinition['id'];
     $address = $order->getAddress($pane);
     foreach ($form_state->getValue($pane) as $key => $value) {
         if (uc_address_field_enabled($key)) {
             $address->{$key} = $value;
         }
     }
     $order->setAddress($pane, $address);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function review(OrderInterface $order)
 {
     $pane = $this->pluginDefinition['id'];
     $address = $order->getAddress($pane);
     $review[] = array('title' => t('Address'), 'data' => $address);
     if (uc_address_field_enabled('phone') && !empty($address->phone)) {
         $review[] = array('title' => t('Phone'), 'data' => SafeMarkup::checkPlain($address->phone));
     }
     return $review;
 }