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

        $variables = $this->getRequest()->get('variable', array());

        // Process all changed variables
        foreach ($variables as $id => $value) {
            $event = new ConfigUpdateEvent($id);
            $event->setValue($value);

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

        return $this->generateRedirectFromRoute('admin.configuration.variables.default');
    }
public function changeValuesAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
            return $response;
        }

        $variables = $this->getRequest()->get('variable', array());

        // Process all changed variables
        foreach ($variables as $id => $value) {
            $event = new ConfigUpdateEvent($id);
            $event->setValue($value);

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

        return $this->generateRedirectFromRoute('admin.configuration.variables.default');
    }
public function changeValuesAction ( ) { // Check current user authorization if ( null !== $ response = $ this -> checkAuth ( $ this -> resourceCode , array ( ) , AccessManager :: UPDATE ) ) { return $ response ; } $ variables = $ this -> getRequest ( ) -> get ( 'variable' , array ( ) ) ; // Process all changed variables foreach ( $ variables as $ id => $ value ) { $ event = new ConfigUpdateEvent ( $ id ) ; $ event -> setValue ( $ value ) ; $ this -> dispatch ( TheliaEvents :: CONFIG_SETVALUE , $ event ) ; } return $ this -> generateRedirectFromRoute ( 'admin.configuration.variables.default' ) ; }
Change values modified directly from the variable list

@return \Thelia\Core\HttpFoundation\Response the response
Change values modified directly from the variable list