當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CCalendar::GetAccessTasks方法代碼示例

本文整理匯總了PHP中CCalendar::GetAccessTasks方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCalendar::GetAccessTasks方法的具體用法?PHP CCalendar::GetAccessTasks怎麽用?PHP CCalendar::GetAccessTasks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CCalendar的用法示例。


在下文中一共展示了CCalendar::GetAccessTasks方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: GetAccessHTML

    public static function GetAccessHTML($binging = 'calendar_section', $id = false)
    {
        if ($id === false) {
            $id = 'bxec-' . $binging;
        }
        $arTasks = CCalendar::GetAccessTasks($binging);
        ?>
		<span style="display:none;">
		<select id="<?php 
        echo $id;
        ?>
" class="bxec-task-select">
			<?php 
        foreach ($arTasks as $taskId => $task) {
            ?>
				<option value="<?php 
            echo $taskId;
            ?>
"><?php 
            echo htmlspecialcharsex($task['title']);
            ?>
</option>
			<?php 
        }
        ?>
		</select>
		</span>
		<?php 
    }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:29,代碼來源:calendar_sceleton.php

示例2: GetAccessTasksByName

 public static function GetAccessTasksByName($binging = 'calendar_section', $name = 'calendar_denied')
 {
     $arTasks = CCalendar::GetAccessTasks($binging);
     foreach ($arTasks as $id => $task) {
         if ($task['name'] == $name) {
             return $id;
         }
     }
     return false;
 }
開發者ID:andy-profi,項目名稱:bxApiDocs,代碼行數:10,代碼來源:calendar.php

示例3: DoConvertStep

 public static function DoConvertStep()
 {
     $types = CCalendarConvert::GetOption('__convert');
     $start_time = microtime(true);
     $time_limit = 2;
     $stage = 'stop';
     $finished = false;
     self::$accessTasks = CCalendar::GetAccessTasks('calendar_section');
     self::$userIblockId = $types['user']['iblockId'];
     foreach ($types as $key => $type) {
         $iblockId = $type['iblockId'];
         if ($iblockId < 0) {
             continue;
         }
         // Fetch type
         if ($key == 'user') {
             $arFilter = array('IBLOCK_ID' => $iblockId, "ACTIVE" => "Y", "CHECK_PERMISSIONS" => 'N', "DEPTH_LEVEL" => 1, "UF_CAL_CONVERTED" => false);
             $dbSections = CIBlockSection::GetList(array('ID' => 'ASC'), $arFilter);
             // For each user:
             while ($arSection = $dbSections->Fetch()) {
                 $ownerId = $arSection["CREATED_BY"];
                 CCalendar::SetUserSettings(false, $ownerId);
                 $res = CCalendarConvert::ConvertEntity('user', $ownerId, $arSection["ID"], $iblockId, $arSection["CREATED_BY"]);
                 if ($res['sectCount'] > 0 || $res['eventsCount'] > 0) {
                     CCalendarConvert::Log(GetMessage("CAL_CONVERT_STAGE_USER_CALS", array('#USER_NAME#' => $arSection['NAME'], '#SECT_COUNT#' => $res['sectCount'], '#EVENTS_COUNT#' => $res['eventsCount'])));
                 }
                 if ($res && ($res['sectCount'] > 0 || $res['eventsCount'] > 0) && microtime(true) - $start_time > $time_limit) {
                     $stage = 'go';
                     break;
                 }
             }
         } elseif ($key == 'group') {
             $arFilter = array('IBLOCK_ID' => $iblockId, "ACTIVE" => "Y", "CHECK_PERMISSIONS" => 'N', "DEPTH_LEVEL" => 1, "UF_CAL_CONVERTED" => false);
             $dbSections = CIBlockSection::GetList(array('ID' => 'ASC'), $arFilter);
             // For each group:
             while ($arSection = $dbSections->Fetch()) {
                 $ownerId = $arSection["SOCNET_GROUP_ID"];
                 $res = CCalendarConvert::ConvertEntity('group', $ownerId, $arSection["ID"], $iblockId, $arSection["CREATED_BY"]);
                 if ($res['sectCount'] > 0 || $res['eventsCount'] > 0) {
                     CCalendarConvert::Log(GetMessage("CAL_CONVERT_STAGE_GROUP_CALS", array('#GROUP_NAME#' => $arSection['NAME'], '#SECT_COUNT#' => $res['sectCount'], '#EVENTS_COUNT#' => $res['eventsCount'])));
                 }
                 if ($res && ($res['sectCount'] > 0 || $res['eventsCount'] > 0) && microtime(true) - $start_time > $time_limit) {
                     $stage = 'go';
                     break;
                 }
             }
         } else {
             $res = CCalendarConvert::ConvertEntity($key, 0, 0, $iblockId, 1);
             if ($res['sectCount'] > 0 || $res['eventsCount'] > 0) {
                 CCalendarConvert::Log(GetMessage("CAL_CONVERT_STAGE_TYPE", array('#TYPE_NAME#' => $type['name'], '#SECT_COUNT#' => $res['sectCount'], '#EVENTS_COUNT#' => $res['eventsCount'])));
             }
             if ($res && ($res['sectCount'] > 0 || $res['eventsCount'] > 0) && microtime(true) - $start_time > $time_limit) {
                 $stage = 'go';
                 break;
             }
         }
         if ($stage == 'go') {
             break;
         }
     }
     return $stage;
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:62,代碼來源:calendar_convert.php


注:本文中的CCalendar::GetAccessTasks方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。