Domain/BaseDomain.php
protected function finalizeResourceStatus(ResourceInterface $resource, $status, $hasError)
    {
        if ($resource->isValid()) {
            $resource->setStatus($status);
        } else {
            $hasError = true;
            $resource->setStatus(ResourceStatutes::ERROR);
            $this->om->detach($resource->getRealData());
        }

        return $hasError;
    }
protected function finalizeResourceStatus(ResourceInterface $resource, $status, $hasError)
    {
        if ($resource->isValid()) {
            $resource->setStatus($status);
        } else {
            $hasError = true;
            $resource->setStatus(ResourceStatutes::ERROR);
            $this->om->detach($resource->getRealData());
        }

        return $hasError;
    }
protected function finalizeResourceStatus ( ResourceInterface $ resource , $ status , $ hasError ) { if ( $ resource -> isValid ( ) ) { $ resource -> setStatus ( $ status ) ; } else { $ hasError = true ; $ resource -> setStatus ( ResourceStatutes :: ERROR ) ; $ this -> om -> detach ( $ resource -> getRealData ( ) ) ; } return $ hasError ; }
Finalize the action for a resource.

@param ResourceInterface $resource
@param string            $status
@param bool              $hasError

@return bool Returns the new hasError value
Finalize the action for a resource .