|
@@ -49,6 +49,7 @@ class ONUSubscriber implements EventSubscriber
|
|
DoctrineEvents::PRE_PERSIST,
|
|
DoctrineEvents::PRE_PERSIST,
|
|
DoctrineEvents::POST_PERSIST,
|
|
DoctrineEvents::POST_PERSIST,
|
|
DoctrineEvents::PRE_UPDATE,
|
|
DoctrineEvents::PRE_UPDATE,
|
|
|
|
+ DoctrineEvents::POST_UPDATE,
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -79,6 +80,19 @@ class ONUSubscriber implements EventSubscriber
|
|
{
|
|
{
|
|
$this->execute($args, DoctrineEvents::PRE_UPDATE);
|
|
$this->execute($args, DoctrineEvents::PRE_UPDATE);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @param LifecycleEventArgs $args
|
|
|
|
+ */
|
|
|
|
+ public function postUpdate(LifecycleEventArgs $args)
|
|
|
|
+ {
|
|
|
|
+ $entity = $args->getEntity();
|
|
|
|
+ if ($entity instanceof ONU) {
|
|
|
|
+ $this->em = $args->getEntityManager();
|
|
|
|
+ $this->setServicePorts($entity);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* @param LifecycleEventArgs $args
|
|
* @param LifecycleEventArgs $args
|