Example #1
0
 /**
  * @return array
  */
 public function AjaxCalendarPublicUpdate()
 {
     $mResult = false;
     $oAccount = $this->getDefaultAccountFromParam();
     $sCalendarId = $this->getParamValue('Id');
     $bIsPublic = (bool) $this->getParamValue('IsPublic');
     if (!$this->oApiCapability->isCalendarSupported($oAccount)) {
         throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::CalendarsNotAllowed);
     }
     $mResult = $this->oApiCalendar->publicCalendar($oAccount, $sCalendarId, $bIsPublic);
     return $this->DefaultResponse($oAccount, __FUNCTION__, $mResult);
 }