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;
    }
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;
    }
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 ; }
Helper function to trigger a DependecyResultEvent.

@param string $name
@param EntityInterface $entity

@return \Core\Service\EntityEraser\DependencyResultCollection
Helper function to trigger a DependecyResultEvent .