src/RunOpenCode/Bundle/ExchangeRate/Controller/CreateController.php 1 location
|
@@ 113-123 (lines=11) @@
|
110 |
|
* |
111 |
|
* @return TRUE if successful. |
112 |
|
*/ |
113 |
|
protected function save(RateInterface $rate) |
114 |
|
{ |
115 |
|
try { |
116 |
|
$this->get('runopencode.exchange_rate.repository')->save([$rate]); |
117 |
|
$this->addFlash('success', $this->get('translator')->trans('flash.create.success', [], 'runopencode_exchange_rate')); |
118 |
|
return true; |
119 |
|
} catch (\Exception $e) { |
120 |
|
$this->addFlash('error', $this->get('translator')->trans('flash.create.error.unknown', [], 'runopencode_exchange_rate')); |
121 |
|
return false; |
122 |
|
} |
123 |
|
} |
124 |
|
|
125 |
|
/** |
126 |
|
* Redirect after success. |
src/RunOpenCode/Bundle/ExchangeRate/Controller/DeleteController.php 1 location
|
@@ 103-113 (lines=11) @@
|
100 |
|
* |
101 |
|
* @return TRUE if successful. |
102 |
|
*/ |
103 |
|
protected function delete(RateInterface $rate) |
104 |
|
{ |
105 |
|
try { |
106 |
|
$this->get('runopencode.exchange_rate.repository')->delete([$rate]); |
107 |
|
$this->addFlash('success', $this->get('translator')->trans('flash.delete.success', [], 'runopencode_exchange_rate')); |
108 |
|
return true; |
109 |
|
} catch (\Exception $e) { |
110 |
|
$this->addFlash('error', $this->get('translator')->trans('flash.delete.error.unknown', [], 'runopencode_exchange_rate')); |
111 |
|
return false; |
112 |
|
} |
113 |
|
} |
114 |
|
|
115 |
|
/** |
116 |
|
* Redirect after success. |
src/RunOpenCode/Bundle/ExchangeRate/Controller/EditController.php 1 location
|
@@ 126-136 (lines=11) @@
|
123 |
|
* @param RateInterface $rate |
124 |
|
* @return TRUE if successful. |
125 |
|
*/ |
126 |
|
protected function save(RateInterface $rate) |
127 |
|
{ |
128 |
|
try { |
129 |
|
$this->get('runopencode.exchange_rate.repository')->save([$rate]); |
130 |
|
$this->addFlash('success', $this->get('translator')->trans('flash.edit.success', [], 'runopencode_exchange_rate')); |
131 |
|
return true; |
132 |
|
} catch (\Exception $e) { |
133 |
|
$this->addFlash('error', $this->get('translator')->trans('flash.edit.error.unknown', [], 'runopencode_exchange_rate')); |
134 |
|
return false; |
135 |
|
} |
136 |
|
} |
137 |
|
|
138 |
|
/** |
139 |
|
* Redirect after success. |