本文整理汇总了PHP中CTask::Delete方法的典型用法代码示例。如果您正苦于以下问题:PHP CTask::Delete方法的具体用法?PHP CTask::Delete怎么用?PHP CTask::Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTask
的用法示例。
在下文中一共展示了CTask::Delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RestoreAll
function RestoreAll()
{
$arBackup = CControllerClient::GetBackup();
if (!is_array($arBackup)) {
return true;
}
if (is_array($arBackup["options"])) {
foreach ($arBackup["options"] as $module_id => $options) {
foreach ($options as $option_id => $option_value) {
COption::SetOptionString($module_id, $option_id, $option_value);
}
}
}
CControllerClient::RestoreModules();
CControllerClient::RestoreSecurity();
if (is_array($arBackup['security_task'])) {
foreach ($arBackup['security_task'] as $task_id) {
CTask::Delete($task_id);
}
}
CControllerClient::SetBackup(array());
return true;
}
示例2: array
}
// обработка действий групповых и одиночных
if (($arID = $lAdmin->GroupAction()) && $USER->CanDoOperation('edit_tasks')) {
if ($_REQUEST['action_target'] == 'selected') {
$arID = array();
$rsData = CTask::GetList(array($by => $order), $arFilter);
while ($arRes = $rsData->Fetch()) {
$arID[] = $arRes['ID'];
}
}
if ($_REQUEST['action'] == "delete") {
foreach ($arID as $ID) {
if (strlen($ID) <= 0) {
continue;
}
CTask::Delete($ID);
}
}
}
// инициализация списка - выборка данных.
$rsData = CTask::GetList(array($by => $order), $arFilter);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
// установке параметров списка
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES")));
// заголовок списка
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => false, "align" => "right"), array("id" => "NAME", "content" => GetMessage("NAME"), "sort" => "", "default" => true), array("id" => "LETTER", "content" => GetMessage("LETTER"), "sort" => "letter", "default" => true), array("id" => "DESCRIPTION", "content" => GetMessage("MAIN_DESCRIPTION"), "sort" => "", "default" => true), array("id" => "MODULE_ID", "content" => GetMessage("MAIN_MODULE_ID"), "sort" => "module_id", "default" => true), array("id" => "SYS", "content" => GetMessage("SYS"), "sort" => "sys", "default" => true), array("id" => "BINDING", "content" => GetMessage("BINDING"), "sort" => "binding", "default" => true)));
// построение списка
while ($arRes = $rsData->NavNext(true, "f_")) {
$row =& $lAdmin->AddRow($f_ID, $arRes, "task_edit.php?lang=" . LANGUAGE_ID . "&ID=" . $f_ID, GetMessage("MAIN_EDIT_TITLE"));
$row->AddViewField("ID", "<a href='task_edit.php?lang=" . LANGUAGE_ID . "&ID=" . $f_ID . "' title='" . GetMessage("MAIN_EDIT_TITLE") . "'>" . $f_ID . "</a>");