Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $currency_code = $form_state->getValue('currency_code');
     $currency = $this->importer->import($currency_code);
     drupal_set_message($this->t('Imported the %label currency.', ['%label' => $currency->label()]));
     $form_state->setRebuild();
 }
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $currency_codes = $form_state->getValue('currency_codes');
     foreach ($currency_codes as $currency_code) {
         $this->importer->import($currency_code);
     }
     drupal_set_message($this->t('Imported the selected currencies.'));
     $form_state->setRebuild();
 }