public function __construct(\Doctrine\ORM\EntityManager $orm, \Newscoop\Image\ImageService $imageService) { $this->orm = $orm; $this->repository = $this->orm->getRepository('Newscoop\\Package\\Package'); $this->imageService = $imageService; }