You are here

public function SimpleStockLevelWidget::closeForm in Commerce Stock 8

Submits the form.

File

modules/field/src/Plugin/Field/FieldWidget/SimpleStockLevelWidget.php, line 92

Class

SimpleStockLevelWidget
Plugin implementation of the 'commerce_stock_level' widget.

Namespace

Drupal\commerce_stock_field\Plugin\Field\FieldWidget

Code

public function closeForm($form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->messenger()
    ->addMessage(t('Updated the stock.'));
}