public function __construct(Registry $registry, Doctrine $doctrine, EventDispatcher $eventDispatcher) { $this->registry = $registry; $this->doctrine = $doctrine; $this->eventDispatcher = $eventDispatcher; }