public function preFlush(EventArgs $eventArgs)
    {
        $em = $eventArgs->getEntityManager();
        $uow = $em->getUnitOfWork();

        foreach ($uow->getScheduledEntityInsertions() as $entity) {
            $this->_triggerEvent(Events::preFlush, $entity, $eventArgs);
        }

        foreach ($uow->getScheduledEntityUpdates() as $entity) {
            $this->_triggerEvent(Events::preFlush, $entity, $eventArgs);
        }

        foreach ($uow->getScheduledEntityDeletions() as $entity) {
            $this->_triggerEvent(Events::preFlush, $entity, $eventArgs);
        }
    }
public function preFlush(EventArgs $eventArgs)
    {
        $em = $eventArgs->getEntityManager();
        $uow = $em->getUnitOfWork();

        foreach ($uow->getScheduledEntityInsertions() as $entity) {
            $this->_triggerEvent(Events::preFlush, $entity, $eventArgs);
        }

        foreach ($uow->getScheduledEntityUpdates() as $entity) {
            $this->_triggerEvent(Events::preFlush, $entity, $eventArgs);
        }

        foreach ($uow->getScheduledEntityDeletions() as $entity) {
            $this->_triggerEvent(Events::preFlush, $entity, $eventArgs);
        }
    }
public function preFlush ( EventArgs $ eventArgs ) { $ em = $ eventArgs -> getEntityManager ( ) ; $ uow = $ em -> getUnitOfWork ( ) ; foreach ( $ uow -> getScheduledEntityInsertions ( ) as $ entity ) { $ this -> _triggerEvent ( Events :: preFlush , $ entity , $ eventArgs ) ; } foreach ( $ uow -> getScheduledEntityUpdates ( ) as $ entity ) { $ this -> _triggerEvent ( Events :: preFlush , $ entity , $ eventArgs ) ; } foreach ( $ uow -> getScheduledEntityDeletions ( ) as $ entity ) { $ this -> _triggerEvent ( Events :: preFlush , $ entity , $ eventArgs ) ; } }
Occur on preFlush events.

@access public

@param Doctrine\Common\EventArgs $eventArgs
Occur on preFlush events .