Example #1
0
 /**
  * @return CTenant
  */
 public function GetTenantAdminObject()
 {
     $oTenant = null;
     $iTenantId = $this->oAdminPanel->TenantId();
     if ($this->oTenantsApi) {
         if (0 < $iTenantId) {
             $oTenant = $this->oTenantsApi->getTenantById($iTenantId);
         } else {
             $oTenant = $this->oTenantsApi->getDefaultGlobalTenant();
         }
     }
     return $oTenant;
 }
Example #2
0
 public function AjaxSocialAccountGet()
 {
     $mResult = false;
     $oTenant = null;
     $oAccount = $this->GetDefaultAccount();
     $sType = trim($this->getParamValue('Type', ''));
     if ($oAccount && $this->oApiTenants) {
         $oTenant = 0 < $oAccount->IdTenant ? $this->oApiTenants->getTenantById($oAccount->IdTenant) : $this->oApiTenants->getDefaultGlobalTenant();
     }
     if ($oTenant) {
         $oApiSocial = \CApi::Manager('social');
         $mResult = $oApiSocial->getSocial($oAccount->IdAccount, $sType);
     }
     return $this->DefaultResponse(null, __FUNCTION__, $mResult);
 }