protected function configureEntityManager(array $doctrineConfig, EntityManager $entityManager)
    {
        if (isset($doctrineConfig['filters'])) {
            foreach ($doctrineConfig['filters'] as $name => $filter) {
                if (!array_get($filter, 'enabled', false)) {
                    continue;
                }

                $entityManager->getFilters()->enable($name);
            }
        }

        if (isset($doctrineConfig['types'])) {
            $databasePlatform = $entityManager->getConnection()->getDatabasePlatform();

            foreach ($doctrineConfig['types'] as $name => $className) {
                Type::addType($name, $className);
                $databasePlatform->registerDoctrineTypeMapping($name, $name);
            }
        }
    }
protected function configureEntityManager(array $doctrineConfig, EntityManager $entityManager)
    {
        if (isset($doctrineConfig['filters'])) {
            foreach ($doctrineConfig['filters'] as $name => $filter) {
                if (!array_get($filter, 'enabled', false)) {
                    continue;
                }

                $entityManager->getFilters()->enable($name);
            }
        }

        if (isset($doctrineConfig['types'])) {
            $databasePlatform = $entityManager->getConnection()->getDatabasePlatform();

            foreach ($doctrineConfig['types'] as $name => $className) {
                Type::addType($name, $className);
                $databasePlatform->registerDoctrineTypeMapping($name, $name);
            }
        }
    }
protected function configureEntityManager ( array $ doctrineConfig , EntityManager $ entityManager ) { if ( isset ( $ doctrineConfig [ 'filters' ] ) ) { foreach ( $ doctrineConfig [ 'filters' ] as $ name => $ filter ) { if ( ! array_get ( $ filter , 'enabled' , false ) ) { continue ; } $ entityManager -> getFilters ( ) -> enable ( $ name ) ; } } if ( isset ( $ doctrineConfig [ 'types' ] ) ) { $ databasePlatform = $ entityManager -> getConnection ( ) -> getDatabasePlatform ( ) ; foreach ( $ doctrineConfig [ 'types' ] as $ name => $ className ) { Type :: addType ( $ name , $ className ) ; $ databasePlatform -> registerDoctrineTypeMapping ( $ name , $ name ) ; } } }
Configures the Doctrine entity manager instance.

@param array         $doctrineConfig
@param EntityManager $entityManager
Configures the Doctrine entity manager instance .