예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $this->submitCustomerForm($form, $form_state);
     $values = $form_state->getValues();
     $this->order->setEmail($values['mail']);
     $this->order->setOwnerId($values['uid']);
     $this->order->save();
     drupal_set_message($this->t('The order %label has been assigned to customer %customer.', ['%label' => $this->order->label(), '%customer' => $this->order->getOwner()->label()]));
     $form_state->setRedirectUrl($this->order->toUrl('collection'));
 }