Commit 76e90bcd authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Utilisation du EntityManagerAwareTrait.

parent 502ad413
......@@ -4,6 +4,8 @@ namespace UnicaenAuth\Event\Listener;
use Zend\EventManager\EventManagerInterface;
use Zend\EventManager\ListenerAggregateInterface;
use UnicaenApp\Service\EntityManagerAwareInterface;
use UnicaenApp\Service\EntityManagerAwareTrait;
use UnicaenAuth\Event\UserAuthenticatedEvent;
/**
......@@ -16,27 +18,15 @@ use UnicaenAuth\Event\UserAuthenticatedEvent;
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
* @see UserAuthenticatedEvent
*/
abstract class AuthenticatedUserSavedAbstractListener implements ListenerAggregateInterface
abstract class AuthenticatedUserSavedAbstractListener implements ListenerAggregateInterface, EntityManagerAwareInterface
{
use EntityManagerAwareTrait;
/**
* @var \Zend\Stdlib\CallbackHandler[]
*/
protected $listeners = array();
/**
* @var \Doctrine\ORM\EntityManager
*/
protected $em;
/**
*
* @param \Doctrine\ORM\EntityManager $em
*/
public function __construct(\Doctrine\ORM\EntityManager $em)
{
$this->em = $em;
}
/**
* Renseigne les relations 'intervenant' et 'personnel' avant que l'objet soit persisté.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment