Resolver/EntityAnnotationResolver.php
private function resolvePersist(LoadEntity $annotation, $entity)
    {
        /**
         * Persist block.
         *
         * This block defines if entity must be persisted using desired
         * manager.
         *
         * Given the entity we can find which manager manages it
         *
         * Same logic in perisist option. This variable is defined in bundle
         * parameters and can be overwritten there. Can also be defined in
         * every single annotation
         */

        /**
         * Get the persist variable. If not defined, is set as defined in
         * parameters.
         */
        $persist = !is_null($annotation->getPersist())
            ? $annotation->getPersist()
            : $this->defaultPersist;

        if ($persist) {

            /**
             * Loading locally desired Doctrine manager.
             */
            $this
                ->doctrine
                ->getManagerForClass(get_class($entity))
                ->persist($entity);
        }
    }
private function resolvePersist(LoadEntity $annotation, $entity)
    {
        /**
         * Persist block.
         *
         * This block defines if entity must be persisted using desired
         * manager.
         *
         * Given the entity we can find which manager manages it
         *
         * Same logic in perisist option. This variable is defined in bundle
         * parameters and can be overwritten there. Can also be defined in
         * every single annotation
         */

        /**
         * Get the persist variable. If not defined, is set as defined in
         * parameters.
         */
        $persist = !is_null($annotation->getPersist())
            ? $annotation->getPersist()
            : $this->defaultPersist;

        if ($persist) {

            /**
             * Loading locally desired Doctrine manager.
             */
            $this
                ->doctrine
                ->getManagerForClass(get_class($entity))
                ->persist($entity);
        }
    }
private function resolvePersist ( LoadEntity $ annotation , $ entity ) { /**
         * Persist block.
         *
         * This block defines if entity must be persisted using desired
         * manager.
         *
         * Given the entity we can find which manager manages it
         *
         * Same logic in perisist option. This variable is defined in bundle
         * parameters and can be overwritten there. Can also be defined in
         * every single annotation
         */ /**
         * Get the persist variable. If not defined, is set as defined in
         * parameters.
         */ $ persist = ! is_null ( $ annotation -> getPersist ( ) ) ? $ annotation -> getPersist ( ) : $ this -> defaultPersist ; if ( $ persist ) { /**
             * Loading locally desired Doctrine manager.
             */ $ this -> doctrine -> getManagerForClass ( get_class ( $ entity ) ) -> persist ( $ entity ) ; } }
Persist block.

This block defines if entity must be persisted using desired
manager.

This manager is defined as default in bundle parameters, but can
be overwritten in each annotation

Same logic in perisist option. This variable is defined in bundle
parameters and can be overwritten there. Can also be defined in
every single annotation

@param LoadEntity $annotation
@param object     $entity
Persist block .