public function setEventManager(EventManagerInterface $eventManager)
    {
        if ($this->eventManager === $eventManager || $eventManager === null) {
            return;
        }

        if ($this->eventManager !== null) {
            $this->detach($this->eventManager);
        }

        $this->eventManager = $eventManager;
        $this->eventManager->addIdentifiers([
            'EntityService',
            'PolderKnowledge\EntityService\Service\EntityService',
            $this->getEntityServiceName(),
            trim($this->getEntityServiceName(), '\\'),
        ]);

        $this->attach($this->eventManager);
    }