src/Server/Resource/DoctrineResource.php
/**
     * This method will give custom listeners te chance to alter entities / collections.
     * Listeners can also return an ApiProblem, which will be returned immediately.
     * It is also possible to throw Exceptions, which will result in an ApiProblem eventually.
     *
     * @param $name
     * @param $entity
     * @param $data mixed The original data supplied to the resource method, if any
     * @return \Zend\EventManager\ResponseCollection
     */
This method will give custom listeners te chance to alter entities / collections.
Listeners can also return an ApiProblem, which will be returned immediately.
It is also possible to throw Exceptions, which will result in an ApiProblem eventually.

@param $name
@param $entity
@param $data mixed The original data supplied to the resource method, if any
@return \Zend\EventManager\ResponseCollection
This method will give custom listeners te chance to alter entities / collections . Listeners can also return an ApiProblem which will be returned immediately . It is also possible to throw Exceptions which will result in an ApiProblem eventually . @param $name @param $entity @param $data mixed The original data supplied to the resource method if any @return \ Zend \ EventManager \ ResponseCollection
protected function triggerDoctrineEvent($name, $entity, $data = null)
    {
        $event = new DoctrineResourceEvent($name, $this);
        $event->setEntity($entity);
        $event->setData($data);
        $event->setObjectManager($this->getObjectManager());
        $event->setResourceEvent($this->getEvent());
        $eventManager = $this->getEventManager();
        $response = $eventManager->triggerEvent($event);
        return $response;
    }
protected function triggerDoctrineEvent ( $ name , $ entity , $ data = null ) { $ event = new DoctrineResourceEvent ( $ name , $ this ) ; $ event -> setEntity ( $ entity ) ; $ event -> setData ( $ data ) ; $ event -> setObjectManager ( $ this -> getObjectManager ( ) ) ; $ event -> setResourceEvent ( $ this -> getEvent ( ) ) ; $ eventManager = $ this -> getEventManager ( ) ; $ response = $ eventManager -> triggerEvent ( $ event ) ; return $ response ; }
This method will give custom listeners te chance to alter entities / collections.
This method will give custom listeners te chance to alter entities / collections .