src/php/main/Eix/Services/Data/Responders/CollectionManager.php
private function getUpdatedEntityResponse()
    {
        $response = $this->getEditionResponse();
        try {
            // Try to store an entity with the data in the request.
            $this->storeEntity();
            $response->addNotice(sprintf(
                _('%s correctly stored.'),
                ucfirst($this->getItemName())
            ));
        } catch (ValidatorException $exception) {
            // The entity could not be stored because of a validation error.
            // Add the error data to the response.
            $response->addErrorMessage(array(
                'validation' => $exception->getValidationStatus(),
            ));
        } catch (\Exception $exception) {
            // An unexpected error has occurred. Display the edition
            // page again.
            $response->addErrorMessage($exception->getMessage());
        }
        // Set the entity data into the response.
        $response->setData(
            $this->getItemName(),
            $this->getEntityData()
        );

        return $response;
    }
private function getUpdatedEntityResponse()
    {
        $response = $this->getEditionResponse();
        try {
            // Try to store an entity with the data in the request.
            $this->storeEntity();
            $response->addNotice(sprintf(
                _('%s correctly stored.'),
                ucfirst($this->getItemName())
            ));
        } catch (ValidatorException $exception) {
            // The entity could not be stored because of a validation error.
            // Add the error data to the response.
            $response->addErrorMessage(array(
                'validation' => $exception->getValidationStatus(),
            ));
        } catch (\Exception $exception) {
            // An unexpected error has occurred. Display the edition
            // page again.
            $response->addErrorMessage($exception->getMessage());
        }
        // Set the entity data into the response.
        $response->setData(
            $this->getItemName(),
            $this->getEntityData()
        );

        return $response;
    }
private function getUpdatedEntityResponse ( ) { $ response = $ this -> getEditionResponse ( ) ; try { // Try to store an entity with the data in the request. $ this -> storeEntity ( ) ; $ response -> addNotice ( sprintf ( _ ( '%s correctly stored.' ) , ucfirst ( $ this -> getItemName ( ) ) ) ) ; } catch ( ValidatorException $ exception ) { // The entity could not be stored because of a validation error. // Add the error data to the response. $ response -> addErrorMessage ( array ( 'validation' => $ exception -> getValidationStatus ( ) , ) ) ; } catch ( \ Exception $ exception ) { // An unexpected error has occurred. Display the edition // page again. $ response -> addErrorMessage ( $ exception -> getMessage ( ) ) ; } // Set the entity data into the response. $ response -> setData ( $ this -> getItemName ( ) , $ this -> getEntityData ( ) ) ; return $ response ; }
Updates an entity with the data in the request, and emits a response to
attest for that.
Updates an entity with the data in the request and emits a response to attest for that .