src/Zicht/Bundle/FrameworkExtraBundle/Doctrine/NestedTreeValidationSubscriber.php
public function postFlush(PostFlushEventArgs $e)
    {
        $repo = $e->getEntityManager()->getRepository($this->entityName);
        if (true !== ($issues = $repo->verify())) {
            throw new \UnexpectedValueException(
                sprintf(
                    "The repository '%s' did not validate. Run the '%s' console command to find out what's going on",
                    $this->entityName,
                    RepairNestedTreeCommand::COMMAND_NAME
                )
            );
        }
    }
public function postFlush(PostFlushEventArgs $e)
    {
        $repo = $e->getEntityManager()->getRepository($this->entityName);
        if (true !== ($issues = $repo->verify())) {
            throw new \UnexpectedValueException(
                sprintf(
                    "The repository '%s' did not validate. Run the '%s' console command to find out what's going on",
                    $this->entityName,
                    RepairNestedTreeCommand::COMMAND_NAME
                )
            );
        }
    }
public function postFlush ( PostFlushEventArgs $ e ) { $ repo = $ e -> getEntityManager ( ) -> getRepository ( $ this -> entityName ) ; if ( true !== ( $ issues = $ repo -> verify ( ) ) ) { throw new \ UnexpectedValueException ( sprintf ( "The repository '%s' did not validate. Run the '%s' console command to find out what's going on" , $ this -> entityName , RepairNestedTreeCommand :: COMMAND_NAME ) ) ; } }
Throw an exception if the validation fails after any save

@param PostFlushEventArgs $e
@return void
@throws \UnexpectedValueException
Throw an exception if the validation fails after any save