本文整理匯總了PHP中CApi::IsHelpdeskModule方法的典型用法代碼示例。如果您正苦於以下問題:PHP CApi::IsHelpdeskModule方法的具體用法?PHP CApi::IsHelpdeskModule怎麽用?PHP CApi::IsHelpdeskModule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CApi
的用法示例。
在下文中一共展示了CApi::IsHelpdeskModule方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Handle
//.........這裏部分代碼省略.........
\CApi::Log('False result.', \ELogLevel::Error);
}
} else {
\CApi::Log('Invalid action.', \ELogLevel::Error);
}
} else {
\CApi::Log('Empty action.', \ELogLevel::Error);
}
} catch (\Exception $oException) {
\CApi::LogException($oException, \ELogLevel::Error);
$this->oHttp->StatusHeader(404);
}
} else {
if ('post' === $sFirstPart) {
$sAction = $this->oHttp->GetPost('Action');
try {
if (!empty($sAction)) {
$sMethodName = 'Post' . $sAction;
if (method_exists($this->oActions, $sMethodName) && is_callable(array($this->oActions, $sMethodName))) {
$this->oActions->SetActionParams($this->oHttp->GetPostAsArray());
if (!call_user_func(array($this->oActions, $sMethodName))) {
\CApi::Log('False result.', \ELogLevel::Error);
}
} else {
\CApi::Log('Invalid action.', \ELogLevel::Error);
}
} else {
\CApi::Log('Empty action.', \ELogLevel::Error);
}
} catch (\Exception $oException) {
\CApi::LogException($oException, \ELogLevel::Error);
}
} else {
if (\CApi::IsHelpdeskModule()) {
$sResult = $this->indexHTML(true, $this->oHttp->GetQuery('helpdesk'));
} else {
if ($this->oHttp->HasQuery('invite')) {
$aInviteValues = \CApi::DecodeKeyValues($this->oHttp->GetQuery('invite'));
$oApiUsersManager = \CApi::Manager('users');
$oApiCalendarManager = \CApi::Manager('calendar');
if (isset($aInviteValues['organizer'])) {
$oAccountOrganizer = $oApiUsersManager->getAccountByEmail($aInviteValues['organizer']);
if (isset($oAccountOrganizer, $aInviteValues['attendee'], $aInviteValues['calendarId'], $aInviteValues['eventId'], $aInviteValues['action'])) {
$oCalendar = $oApiCalendarManager->getCalendar($oAccountOrganizer, $aInviteValues['calendarId']);
if ($oCalendar) {
$oEvent = $oApiCalendarManager->getEvent($oAccountOrganizer, $aInviteValues['calendarId'], $aInviteValues['eventId']);
if ($oEvent && is_array($oEvent) && 0 < count($oEvent) && isset($oEvent[0])) {
if (is_string($sResult)) {
$sResult = file_get_contents(PSEVEN_APP_ROOT_PATH . 'templates/CalendarEventInviteExternal.html');
$dt = new \DateTime();
$dt->setTimestamp($oEvent[0]['startTS']);
if (!$oEvent[0]['allDay']) {
$sDefaultTimeZone = new \DateTimeZone($oAccountOrganizer->getDefaultStrTimeZone());
$dt->setTimezone($sDefaultTimeZone);
}
$sAction = $aInviteValues['action'];
$sActionColor = 'green';
$sActionText = '';
switch (strtoupper($sAction)) {
case 'ACCEPTED':
$sActionColor = 'green';
$sActionText = 'Accepted';
break;
case 'DECLINED':
$sActionColor = 'red';
$sActionText = 'Declined';
示例2: IsMainModule
/**
* @return bool
*/
public static function IsMainModule()
{
return !CApi::IsMobileApplication() && !CApi::IsHelpdeskModule() && !CApi::IsCalendarPubModule() && !CApi::IsFilesPubModule();
}