You are here

function commerce_invoice_number_pattern_form_submit in Commerce Invoice 7.2

Form API submit callback for the pattern form.

File

./commerce_invoice.admin.inc, line 94
Administrative form and page callbacks for the Commerce Invoice module.

Code

function commerce_invoice_number_pattern_form_submit(&$form, &$form_state) {

  /** @var \Drupal\commerce_invoice\Entity\InvoiceNumberPattern $pattern */
  $pattern = entity_ui_form_submit_build_entity($form, $form_state);
  $pattern
    ->save();
  $form_state['redirect'] = 'admin/commerce/config/invoice/numbers';
}