private function triggerEvent($name, EntityInterface $entity)
    {
        $params = $this->options;
        $params['entity'] = $entity;
        $params['repositories'] = $this->repositories;

        /* @var DependencyResultEvent $event */
        $event = $this->entityEraserEvents->getEvent($name, $this, $params);

        $this->entityEraserEvents->triggerEvent($event);
        $dependencies = $event->getDependencyResultCollection();

        return $dependencies;
    }