Exemplo n.º 1
0
 /**
  * @param CTenant $oTenant
  *
  * @return bool
  */
 public function updateTenant(CTenant $oTenant)
 {
     $bResult = $this->oConnection->Execute($this->oCommandCreator->updateTenant($oTenant));
     if ($bResult) {
         $this->deleteSocialsByTenantId($oTenant->IdTenant);
         foreach ($oTenant->Socials as $sKey => $oSocial) {
             $oSocial->IdTenant = $oTenant->IdTenant;
             $this->createSocial($oSocial);
         }
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }