Exemplo n.º 1
0
 /**
  * Save disable consent to database
  *
  * @return bool True on success and false on error
  * @throws \Exception
  */
 private function _saveDisableConsent()
 {
     $entityManager = $this->getEntityManager();
     foreach ($this->_disableConsent as $disable) {
         $remoteConnection = $this->getConnectionService()->findById($disable['remoteeid']);
         // Create relation
         $linkedConnectionRelation = new Janus\ServiceRegistry\Entity\Connection\Revision\DisableConsentRelation($this->_entity->getCurrentRevision(), $remoteConnection);
         $entityManager->persist($linkedConnectionRelation);
     }
     $entityManager->flush();
     return true;
 }