src/Doctrine/Tracy/Panel.php
public function setEntityManager(EntityManager $entityManager)
	{
		$this->entityManager = $entityManager;
		$this->connection = $entityManager->getConnection();
		$bar = Debugger::getBar();
		$bar->addPanel($this);

		$config = $this->connection->getConfiguration();
		$logger = $config->getSQLLogger();

		if ($logger instanceof Doctrine\DBAL\Logging\LoggerChain) {
			$logger->addLogger($this);
		} else {
			$config->setSQLLogger($this);
		}
	}
public function setEntityManager(EntityManager $entityManager)
	{
		$this->entityManager = $entityManager;
		$this->connection = $entityManager->getConnection();
		$bar = Debugger::getBar();
		$bar->addPanel($this);

		$config = $this->connection->getConfiguration();
		$logger = $config->getSQLLogger();

		if ($logger instanceof Doctrine\DBAL\Logging\LoggerChain) {
			$logger->addLogger($this);
		} else {
			$config->setSQLLogger($this);
		}
	}
public function setEntityManager ( EntityManager $ entityManager ) { $ this -> entityManager = $ entityManager ; $ this -> connection = $ entityManager -> getConnection ( ) ; $ bar = Debugger :: getBar ( ) ; $ bar -> addPanel ( $ this ) ; $ config = $ this -> connection -> getConfiguration ( ) ; $ logger = $ config -> getSQLLogger ( ) ; if ( $ logger instanceof Doctrine \ DBAL \ Logging \ LoggerChain ) { $ logger -> addLogger ( $ this ) ; } else { $ config -> setSQLLogger ( $ this ) ; } }
Sets entity manager.

@param EntityManager $entityManager The Doctrine Entity Manager
Sets entity manager .