public function DisableCurrency::execute in Currency 8.3
Disables a currency.
Parameters
\Drupal\currency\Entity\CurrencyInterface $currency:
Return value
\Symfony\Component\HttpFoundation\RedirectResponse
1 string reference to 'DisableCurrency::execute'
File
- src/
Controller/ DisableCurrency.php, line 41
Class
- DisableCurrency
- Handles the "disable currency" route.
Namespace
Drupal\currency\ControllerCode
public function execute(CurrencyInterface $currency) {
$currency
->disable();
$currency
->save();
return new RedirectResponse($this->urlGenerator
->generateFromRoute('entity.currency.collection', array(
'absolute' => TRUE,
)));
}