You are here

public function CurrencyLocaleForm::save in Currency 8.3

.

Overrides EntityForm::save

File

src/Entity/CurrencyLocale/CurrencyLocaleForm.php, line 161

Class

CurrencyLocaleForm
Provides a currency_locale add/edit form.

Namespace

Drupal\currency\Entity\CurrencyLocale

Code

public function save(array $form, FormStateInterface $form_state) {
  $currency_locale = $this
    ->getEntity($form_state);
  $currency_locale
    ->save();
  $this
    ->messenger()
    ->addMessage($this
    ->t('The currency locale %label has been saved.', array(
    '%label' => $currency_locale
      ->label(),
  )));
  $form_state
    ->setRedirect('entity.currency_locale.collection');
}