|
@@ -654,25 +654,6 @@ class ONUAdmin extends WorkflowBaseAdmin
|
|
return $hex;
|
|
return $hex;
|
|
}
|
|
}
|
|
|
|
|
|
- public function update($object){
|
|
|
|
- $em = $this->getConfigurationPool()->getContainer()->get('doctrine.orm.entity_manager');
|
|
|
|
- $all = $em->getRepository(\FTTHBundle\Entity\ServicePort::class)->findBy(array("onu" => $object));
|
|
|
|
- foreach($all as $sp){
|
|
|
|
- if(!$object->getServicePort()->contains($sp)){
|
|
|
|
- $em->remove($sp);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- foreach($object->getServicePort() as $sp){
|
|
|
|
- $sp->setOnu($object);
|
|
|
|
- $em->persist($sp);
|
|
|
|
- if(!$sp->getOlt()){
|
|
|
|
- $sp->setOlt($object->getOlt());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return parent::update($object);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* @param Form $form
|
|
* @param Form $form
|
|
* @param Template $template
|
|
* @param Template $template
|