本文整理汇总了PHP中CGroup::SetTasks方法的典型用法代码示例。如果您正苦于以下问题:PHP CGroup::SetTasks方法的具体用法?PHP CGroup::SetTasks怎么用?PHP CGroup::SetTasks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGroup
的用法示例。
在下文中一共展示了CGroup::SetTasks方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
if ($groupID <= 0) {
continue;
}
$SiteGroup["STRING_ID"] = $arGroup["STRING_ID"];
$SiteGroups[$arGroup["STRING_ID"]] = $groupID;
//Set tasks binding to module
$arTasksID = array();
foreach ($arGroup["TASKS_MODULE"] as $taskName) {
$dbResult = CTask::GetList(array(), array("NAME" => $taskName));
if ($arTask = $dbResult->Fetch()) {
$arTasksID[] = $arTask["ID"];
}
}
if (!empty($arTasksID)) {
CGroup::SetTasks($groupID, $arTasksID, true);
}
//Set tasks binding to file
foreach ($arGroup["TASKS_FILE"] as $arFile) {
$taskName = $arFile[0];
$filePath = $arFile[1];
$dbResult = CTask::GetList(array(), array("NAME" => $taskName));
if ($arTask = $dbResult->Fetch()) {
WizardServices::SetFilePermission(array(WIZARD_SITE_ID, $filePath), array($groupID => "T_" . $arTask["ID"]));
}
}
if ($arGroup["STRING_ID"] == "EMPLOYEES_" . WIZARD_SITE_ID) {
WizardServices::SetFilePermission(array(WIZARD_SITE_ID, WIZARD_SITE_DIR), array("*" => 'D'));
WizardServices::SetFilePermission(array(WIZARD_SITE_ID, WIZARD_SITE_DIR), array($groupID => 'R'));
}
if (WIZARD_IS_RERUN === false) {
示例2: array
COption::SetOptionString("main", "new_user_registration_def_group", $groupID);
if ($editProfileTask) {
CGroup::SetTasks($groupID, array($editProfileTask), true);
}
}
//Control panel users
$dbResult = CGroup::GetList($by, $order, array("STRING_ID" => "CONTROL_PANEL_USERS"));
$arGroup = $dbResult->Fetch();
if (!$arGroup) {
$group = new CGroup();
$arFields = array("ACTIVE" => "Y", "C_SORT" => 4, "NAME" => GetMessage("CONTROL_PANEL_GROUP_NAME"), "STRING_ID" => "CONTROL_PANEL_USERS");
$groupID = $group->Add($arFields);
if ($groupID > 0) {
DemoSiteUtil::SetFilePermission(array("s1", "/bitrix/admin"), array($groupID => "R"));
if ($editProfileTask) {
CGroup::SetTasks($groupID, array($editProfileTask), true);
}
}
} else {
$groupID = $arGroup["ID"];
}
if ($groupID > 0 && !strlen(COption::GetOptionString("main", "show_panel_for_users", ""))) {
COption::SetOptionString("main", "show_panel_for_users", serialize(array("G" . $groupID)));
}
//Options
$server_name = $_SERVER["HTTP_HOST"] != '' ? $_SERVER["HTTP_HOST"] : $_SERVER["SERVER_NAME"];
if ($_SERVER["SERVER_PORT"] != 80 && $_SERVER["SERVER_PORT"] != 443 && $_SERVER["SERVER_PORT"] > 0 && strpos($_SERVER["HTTP_HOST"], ":") === false) {
$server_name .= ":" . $_SERVER["SERVER_PORT"];
}
COption::SetOptionString("main", "server_name", $server_name);
COption::SetOptionString("main", "upload_dir", "upload");
示例3: isset
$arOpInTask = CTask::GetOperations($arTaskIds[$i]['ID']);
if (in_array($nID, $arOpInTask) || in_array($nID2, $arOpInTask)) {
$handle_subord = true;
}
break;
}
}
if ($handle_subord) {
$arSubordinateGroups = isset($_POST['subordinate_groups']) ? $_POST['subordinate_groups'] : array();
CGroup::SetSubordinateGroups($ID, $arSubordinateGroups);
} else {
CGroup::SetSubordinateGroups($ID);
}
$old_arTasks = CGroup::GetTasks($ID, true);
if (count(array_diff($old_arTasks, $arTasks)) > 0 || count(array_diff($arTasks, $old_arTasks)) > 0) {
CGroup::SetTasks($ID, $arTasks);
}
}
if ($USER->CanDoOperation('edit_groups') && $_REQUEST["save"] != '') {
LocalRedirect("group_admin.php?lang=" . LANGUAGE_ID);
} elseif ($USER->CanDoOperation('edit_groups') && $_REQUEST["apply"] != '') {
LocalRedirect($APPLICATION->GetCurPage() . "?lang=" . LANGUAGE_ID . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
} elseif ($new == "Y") {
LocalRedirect($APPLICATION->GetCurPage() . "?lang=" . LANGUAGE_ID . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
}
}
}
$str_USER_ID = array();
$z = CGroup::GetByID($ID, "N");
if ($z->ExtractFields("str_")) {
if ($USER_COUNT <= $USER_COUNT_MAX && $ID != 2) {