You are here

public function QuotePane::process in Ubercart 8.4

Processes a checkout pane.

Parameters

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

array $form: The checkout form array.

\Drupal\Core\Form\FormStateInterface $form_state: The checkout form state array.

Return value

bool TRUE if the pane is valid, FALSE otherwise.

Overrides CheckoutPanePluginBase::process

File

shipping/uc_quote/src/Plugin/Ubercart/CheckoutPane/QuotePane.php, line 134

Class

QuotePane
Shipping quote checkout pane plugin.

Namespace

Drupal\uc_quote\Plugin\Ubercart\CheckoutPane

Code

public function process(OrderInterface $order, array $form, FormStateInterface $form_state) {
  $this
    ->prepare($order, $form, $form_state);
  if (!isset($order->quote) && \Drupal::config('uc_quote.settings')
    ->get('require_quote')) {
    $form_state
      ->setErrorByName('panes][quotes][quotes][quote_option', $this
      ->t('You must select a shipping option before continuing.'));
    return FALSE;
  }
  return TRUE;
}