src/RunOpenCode/Bundle/ExchangeRate/Controller/CreateController.php 1 location
|
@@ 78-81 (lines=4) @@
|
| 75 |
|
$form->addError(new FormError($this->get('translator')->trans('flash.create.error.exists', [], 'runopencode_exchange_rate'), 'flash.create.error.exits')); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
if (!$form->isValid()) { |
| 79 |
|
$this->addFlash('error', $this->get('translator')->trans('flash.form.error', [], 'runopencode_exchange_rate')); |
| 80 |
|
return false; |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
return $this->save($rate); |
| 84 |
|
} |
src/RunOpenCode/Bundle/ExchangeRate/Controller/EditController.php 1 location
|
@@ 92-95 (lines=4) @@
|
| 89 |
|
*/ |
| 90 |
|
$rate = $form->getData()->toRate($exchangeRate); |
| 91 |
|
|
| 92 |
|
if (!$form->isValid()) { |
| 93 |
|
$this->addFlash('error', $this->get('translator')->trans('flash.form.error', [], 'runopencode_exchange_rate')); |
| 94 |
|
return false; |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
return $this->save($rate); |
| 98 |
|
} |