本文整理汇总了PHP中CCalendar::GetSectionList方法的典型用法代码示例。如果您正苦于以下问题:PHP CCalendar::GetSectionList方法的具体用法?PHP CCalendar::GetSectionList怎么用?PHP CCalendar::GetSectionList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCalendar
的用法示例。
在下文中一共展示了CCalendar::GetSectionList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: IsModuleInstalled
global $USER_FIELD_MANAGER;
$arResult['ID'] = $id;
$arParams["FORM_ID"] = (!empty($arParams["FORM_ID"]) ? $arParams["FORM_ID"] : "blogPostForm");
$arParams["JS_OBJECT_NAME"] = 'oCalEditor'.$id;
$arParams['EDITOR_HEIGHT'] = 120;
$arParams['EVENT_ID'] = 0; // Only for new events
$arParams['OWNER_TYPE'] = 'user';
$arParams['CUR_USER'] = $USER->GetId();
$arResult['USER_FIELDS'] = $USER_FIELD_MANAGER->GetUserFields("CALENDAR_EVENT", $arParams['EVENT_ID'], LANGUAGE_ID);
// Webdaw upload file UF
$arParams["UPLOAD_WEBDAV_ELEMENT"] = $arResult['USER_FIELDS']['UF_WEBDAV_CAL_EVENT'];
$arParams['SECTIONS'] = CCalendar::GetSectionList(array(
'CAL_TYPE' => $arParams['OWNER_TYPE'],
'OWNER_ID' => $arParams['CUR_USER']
));
if (empty($arParams['SECTIONS']))
{
$defCalendar = CCalendarSect::CreateDefault(array(
'type' => $arParams['OWNER_TYPE'],
'ownerId' => $arParams['CUR_USER']
));
$arParams['SECTIONS'][] = $defCalendar;
CCalendar::SetCurUserMeetingSection($defCalendar['ID']);
}
$arParams['EVENT'] = CCalendarEvent::GetById($arParams['EVENT_ID']);
$arParams["DESTINATION"] = (is_array($arParams["DESTINATION"]) && IsModuleInstalled("socialnetwork") ? $arParams["DESTINATION"] : array());
示例2: array
$arTypes = array();
$types = CCalendarType::GetList();
if (is_array($types)) {
foreach ($types as $type) {
$arTypes[$type["XML_ID"]] = "[" . $type["XML_ID"] . "] " . $type["NAME"];
}
}
$arParams = array();
// $arComponentParameters["PARAMETERS"]
$arParams["CALENDAR_TYPE"] = array("PARENT" => "BASE", "NAME" => GetMessage("EC_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypes, "REFRESH" => 'Y');
if (!isset($arCurrentValues) && count($arTypes) > 0) {
$arCurrentValues["CALENDAR_TYPE"] = each($arTypes);
$arCurrentValues["CALENDAR_TYPE"] = $arCurrentValues["CALENDAR_TYPE"]["key"];
}
if ($arCurrentValues["CALENDAR_TYPE"] != 'user' && $arCurrentValues["CALENDAR_TYPE"] != 'group') {
$Sect = CCalendar::GetSectionList(array('CAL_TYPE' => $arCurrentValues["CALENDAR_TYPE"]));
if (count($Sect) > 0) {
$arSections = array('0' => '- ' . GetMessage("EC_CALENDAR_SECTION_ALL") . ' -');
foreach ($Sect as $section) {
$arSections[$section["ID"]] = "[" . $section["ID"] . "] " . $section["NAME"];
}
$arParams["CALENDAR_SECTION_ID"] = array("PARENT" => "BASE", "NAME" => GetMessage("EC_CALENDAR_SECTION"), "TYPE" => "LIST", "VALUES" => $arSections);
}
}
if (CCalendar::IsIntranetEnabled() && $bSocNet) {
$arParams["B_CUR_USER_LIST"] = array("PARENT" => "BASE", "NAME" => GetMessage("ECL_P_CUR_USER_EVENT_LIST"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y");
}
$arParams["INIT_DATE"] = array("PARENT" => "BASE", "NAME" => GetMessage("ECL_P_INIT_DATE"), "DEFAULT" => '-' . GetMessage("ECL_P_SHOW_CUR_DATE") . '-');
$arParams["FUTURE_MONTH_COUNT"] = array("PARENT" => "BASE", "TYPE" => "LIST", "NAME" => GetMessage("ECL_P_FUTURE_MONTH_COUNT"), "VALUES" => array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "12" => "12", "24" => "24"), "DEFAULT" => "2");
$arParams["DETAIL_URL"] = array("PARENT" => "BASE", "NAME" => GetMessage("ECL_P_DETAIL_URL"), "DEFAULT" => "");
$arParams["EVENTS_COUNT"] = array("PARENT" => "BASE", "NAME" => GetMessage("ECL_P_EVENTS_COUNT"), "DEFAULT" => "5");
示例3: intval
}
$Event['~LOCATION'] = $Event['LOCATION'] !== '' ? CCalendar::GetTextLocation($Event["LOCATION"]) : '';
if ($Event['RRULE'] !== '') {
$Event['RRULE'] = CCalendarEvent::ParseRRULE($Event['RRULE']);
if (is_array($Event['RRULE']) && !isset($Event['RRULE']['UNTIL'])) {
$Event['RRULE']['UNTIL'] = $Event['DT_TO_TS'];
}
$Event['DT_TO_TS'] = $Event['DT_FROM_TS'] + intval($Event['DT_LENGTH']);
}
$arResult['EVENT'] = $Event;
$calType = $Event['CAL_TYPE'];
$ownerId = $Event['OWNER_ID'];
} else {
$Event = array();
// Event is not found
$arResult['DELETED'] = "Y";
$arResult['EVENT_ID'] = $eventId;
}
}
$arResult['CAL_TYPE'] = $calType;
$arResult['OWNER_ID'] = $ownerId;
$arResult['USER_ID'] = $userId;
$arResult['SECTIONS'] = array();
$sections = CCalendar::GetSectionList(array('CAL_TYPE' => $calType, 'OWNER_ID' => $ownerId));
if (empty($sections)) {
$sections = array(CCalendarSect::CreateDefault(array('type' => $calType, 'ownerId' => $ownerId)));
}
foreach ($sections as $sect) {
$arResult['SECTIONS'][] = array('ID' => $sect['ID'], 'NAME' => $sect['NAME']);
}
$this->IncludeComponentTemplate();