Just ```$this->em = $doctrine->getManager()```.
The important thing is to inject doctrine, not the entity manager.
Have a look at the doc for more precise informations: http://symfony.com/doc/current/book/doctrine.html#persisting-objects-to-the-database