public function updateRatesAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
            return $response;
        }

        try {
            $event = new CurrencyUpdateRateEvent();

            $this->dispatch(TheliaEvents::CURRENCY_UPDATE_RATES, $event);

            if ($event->hasUndefinedRates()) {
                return $this->render('currencies', [
                    'undefined_rates' => $event->getUndefinedRates()
                ]);
            }
        } catch (\Exception $ex) {
            // Any error
            return $this->errorPage($ex);
        }

        return $this->redirectToListTemplate();
    }
public function updateRatesAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
            return $response;
        }

        try {
            $event = new CurrencyUpdateRateEvent();

            $this->dispatch(TheliaEvents::CURRENCY_UPDATE_RATES, $event);

            if ($event->hasUndefinedRates()) {
                return $this->render('currencies', [
                    'undefined_rates' => $event->getUndefinedRates()
                ]);
            }
        } catch (\Exception $ex) {
            // Any error
            return $this->errorPage($ex);
        }

        return $this->redirectToListTemplate();
    }
public function updateRatesAction ( ) { // Check current user authorization if ( null !== $ response = $ this -> checkAuth ( $ this -> resourceCode , array ( ) , AccessManager :: UPDATE ) ) { return $ response ; } try { $ event = new CurrencyUpdateRateEvent ( ) ; $ this -> dispatch ( TheliaEvents :: CURRENCY_UPDATE_RATES , $ event ) ; if ( $ event -> hasUndefinedRates ( ) ) { return $ this -> render ( 'currencies' , [ 'undefined_rates' => $ event -> getUndefinedRates ( ) ] ) ; } } catch ( \ Exception $ ex ) { // Any error return $ this -> errorPage ( $ ex ) ; } return $ this -> redirectToListTemplate ( ) ; }
Update currencies rates
Update currencies rates