src/Sasedev/Commons/SharedBundle/Controller/BaseController.php
public function getEntityManager($name = null)
	{

		$entityManager = $this->getDoctrine()->getManager($name);
		if (!$entityManager->isOpen()) {
			$entityManager = $entityManager->create($entityManager->getConnection(), $entityManager->getConfiguration());
		}

		return $entityManager;

	}
public function getEntityManager($name = null)
	{

		$entityManager = $this->getDoctrine()->getManager($name);
		if (!$entityManager->isOpen()) {
			$entityManager = $entityManager->create($entityManager->getConnection(), $entityManager->getConfiguration());
		}

		return $entityManager;

	}
Get Doctrine Entity Manager

@return ObjectManager