Domain/BaseDomain.php
protected function getErrorIdentifier($object, $type)
    {
        $idValue = DomainUtil::getIdentifier($this->om, $object);
        $idError = null;

        if (Domain::TYPE_CREATE === $type && null !== $idValue) {
            $idError = $this->translator->trans('domain.identifier.error_create', [], 'FxpResource');
        } elseif (Domain::TYPE_UPDATE === $type && null === $idValue) {
            $idError = $this->translator->trans('domain.identifier.error_update', [], 'FxpResource');
        } elseif (Domain::TYPE_DELETE === $type && null === $idValue) {
            $idError = $this->translator->trans('domain.identifier.error_delete', [], 'FxpResource');
        } elseif (Domain::TYPE_UNDELETE === $type && null === $idValue) {
            $idError = $this->translator->trans('domain.identifier.error_undeleted', [], 'FxpResource');
        }

        return $idError;
    }
protected function getErrorIdentifier($object, $type)
    {
        $idValue = DomainUtil::getIdentifier($this->om, $object);
        $idError = null;

        if (Domain::TYPE_CREATE === $type && null !== $idValue) {
            $idError = $this->translator->trans('domain.identifier.error_create', [], 'FxpResource');
        } elseif (Domain::TYPE_UPDATE === $type && null === $idValue) {
            $idError = $this->translator->trans('domain.identifier.error_update', [], 'FxpResource');
        } elseif (Domain::TYPE_DELETE === $type && null === $idValue) {
            $idError = $this->translator->trans('domain.identifier.error_delete', [], 'FxpResource');
        } elseif (Domain::TYPE_UNDELETE === $type && null === $idValue) {
            $idError = $this->translator->trans('domain.identifier.error_undeleted', [], 'FxpResource');
        }

        return $idError;
    }
protected function getErrorIdentifier ( $ object , $ type ) { $ idValue = DomainUtil :: getIdentifier ( $ this -> om , $ object ) ; $ idError = null ; if ( Domain :: TYPE_CREATE === $ type && null !== $ idValue ) { $ idError = $ this -> translator -> trans ( 'domain.identifier.error_create' , [ ] , 'FxpResource' ) ; } elseif ( Domain :: TYPE_UPDATE === $ type && null === $ idValue ) { $ idError = $ this -> translator -> trans ( 'domain.identifier.error_update' , [ ] , 'FxpResource' ) ; } elseif ( Domain :: TYPE_DELETE === $ type && null === $ idValue ) { $ idError = $ this -> translator -> trans ( 'domain.identifier.error_delete' , [ ] , 'FxpResource' ) ; } elseif ( Domain :: TYPE_UNDELETE === $ type && null === $ idValue ) { $ idError = $ this -> translator -> trans ( 'domain.identifier.error_undeleted' , [ ] , 'FxpResource' ) ; } return $ idError ; }
Get the error of identifier.

@param object $object The object data
@param int    $type   The type of persist

@return null|string
Get the error of identifier .