public function __construct(EntityManager $em, $dispatcher) { $this->em = $em; $this->dispatcher = $dispatcher; }