Ejemplo n.º 1
0
 /**
  * @param CTenant $oTenant
  */
 public function UpdateTenantAdminObject($oTenant)
 {
     $bResult = false;
     $iTenantId = $this->oAdminPanel->TenantId();
     if ($this->oTenantsApi && $oTenant && (0 === $iTenantId || 0 < $iTenantId && $iTenantId === $oTenant->IdTenant)) {
         $bResult = $this->oTenantsApi->updateTenant($oTenant);
     }
     return $bResult;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
	public function AjaxSocialAccountDelete()
	{
		$mResult = false;
		$oTenant = null;
		$oAccount = $this->GetDefaultAccount();
		if ($oAccount && $this->oApiTenants)
		{
			$oTenant = (0 < $oAccount->IdTenant) ? $this->oApiTenants->GetTenantById($oAccount->IdTenant) :
				$this->oApiTenants->GetDefaultGlobalTenant();
		}
		if ($oTenant)
		{
			$iType = (int) trim($this->getParamValue('Type', 0));
			$oApiSocial /* @var $oApiSocial \CApiSocialManager */ = \CApi::Manager('social');
			$mResult = $oApiSocial->DeleteSocial($oAccount->IdAccount, $iType);
		}
		return $this->DefaultResponse(null, __FUNCTION__, $mResult);
	}