本文整理汇总了PHP中CAdminList::CheckListMode方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminList::CheckListMode方法的具体用法?PHP CAdminList::CheckListMode怎么用?PHP CAdminList::CheckListMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminList
的用法示例。
在下文中一共展示了CAdminList::CheckListMode方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MakeTimeStamp
$stmp = MakeTimeStamp($arChangeRecord["DATE_CREATE"], "DD.MM.YYYY HH:MI:SS");
$row->AddField("DATE_CREATE", date("d.m.Y H:i", $stmp));
$row->AddField("USER_ID", GetFormatedUserName($arChangeRecord["USER_ID"], false));
$arRecord = CSaleOrderChange::GetRecordDescription($arChangeRecord["TYPE"], $arChangeRecord["DATA"]);
$row->AddField("TYPE", $arRecord["NAME"]);
$row->AddField("DATA", htmlspecialcharsbx($arRecord["INFO"]));
$arOperations[$arChangeRecord["TYPE"]] = $arRecord["NAME"];
}
if($_REQUEST["table_id"]==$sTableID_tab5)
$lAdmin_tab5->CheckListMode();
//end get history order list
$aTabs = array();
$aTabs[] = array("DIV" => "edit1", "TAB" => GetMessage("SODN_TAB_ORDER"), "TITLE" => GetMessage("SODN_TAB_ORDER_DESCR"), "ICON" => "sale");
$aTabs[] = array("DIV" => "edit3", "TAB" => GetMessage("SODN_TAB_TRANSACT"), "TITLE" => GetMessage("SODN_TAB_TRANSACT_DESCR"), "ICON" => "sale");
$aTabs[] = array("DIV" => "edit4", "TAB" => GetMessage("SODN_TAB_HISTORY"), "TITLE" => GetMessage("SODN_TAB_HISTORY_DESCR"), "ICON" => "sale");
$tabControl = new CAdminForm("order_view_info", $aTabs, true, true);
$tabControl->SetShowSettings(false);
$tabControl->AddTabs($customTabber);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");
示例2: GetMessage
$row->AddInputField("RATE", array("size" => "8"));
$arActions = array();
$arActions[] = array("ICON" => "edit", "TEXT" => GetMessage("MAIN_ADMIN_MENU_EDIT"), "DEFAULT" => "Y", "ACTION" => $lAdmin->ActionRedirect("/bitrix/admin/currency_rate_edit.php?ID=" . $f_ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_")));
if ($CURRENCY_RIGHT == "W") {
$arActions[] = array("SEPARATOR" => true);
$arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "ACTION" => "if(confirm('" . GetMessage('CONFIRM_DEL_MESSAGE') . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete"));
}
$row->AddActions($arActions);
}
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsData->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
if ($CURRENCY_RIGHT == "W") {
$lAdmin->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE")));
}
$aContext = array(array("ICON" => "btn_new", "TEXT" => GetMessage("CURRENCY_NEW_TITLE"), "LINK" => "/bitrix/admin/currency_rate_edit.php?lang=" . LANGUAGE_ID . GetFilterParams("filter_"), "TITLE" => GetMessage("CURRENCY_NEW_TITLE")));
$lAdmin->AddAdminContextMenu($aContext);
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("CURRENCY_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<form method="get" action="<?php
echo $APPLICATION->GetCurPage();
?>
" name="find_form">
<?php
$filter->Begin();
?>
<tr>
<td><?php
echo GetMessage("curr_rates_date1");
?>
:</td>
示例3: array
$row->AddField("CLASS_NAME", $f_CLASS_NAME);
$arActions = array();
$arActions[] = array("ICON" => "edit", "TEXT" => Loc::getMessage("SALE_DSE_COPY"), "ACTION" => $lAdminSubServices->ActionRedirect("sale_delivery_service_edit.php?lang=" . LANG . "&ID=" . $f_ID . "&action=copy&back_url=" . urlencode($APPLICATION->GetCurPageParam())), "DEFAULT" => true);
$arActions[] = array("ICON" => "edit", "TEXT" => Loc::getMessage("SALE_DSE_EDIT_DESCR"), "ACTION" => $lAdminSubServices->ActionRedirect("sale_delivery_service_edit.php?lang=" . LANG . "&PARENT_ID=" . $f_PARENT_ID . "&ID=" . $f_ID . "&back_url=" . urlencode($APPLICATION->GetCurPageParam())), "DEFAULT" => true);
if ($saleModulePermissions >= "W") {
$arActions[] = array("SEPARATOR" => true);
$arActions[] = array("ICON" => "delete", "TEXT" => Loc::getMessage("SALE_DSE_DELETE"), "ACTION" => "if(confirm('" . Loc::getMessage('SALE_DSE_CONFIRM_DEL_PROFILE_MESSAGE') . "')) " . $lAdminSubServices->ActionRedirect("sale_delivery_service_edit.php?lang=" . LANG . "&PARENT_ID=" . $fields["PARENT_ID"] . "&ID=" . $ID . "&action=profile_delete&ID_PROF=" . $f_ID));
}
$row->AddActions($arActions);
}
if ($saleModulePermissions == "W") {
$aContext = array(array("TEXT" => Loc::getMessage("SALE_DSE_ADD_NEW_PROFILE"), "LINK" => "sale_delivery_service_edit.php?lang=" . LANG . "&PARENT_ID=" . $ID . "&back_url=" . urlencode($APPLICATION->GetCurPageParam()), "TITLE" => Loc::getMessage("SALE_DSE_ADD_NEW_PROFILE_TITLE"), "ICON" => "btn_new"));
$lAdminSubServices->AddAdminContextMenu($aContext, false);
}
if ($_REQUEST["table_id"] == $sTableIDSubService) {
$lAdminSubServices->CheckListMode();
}
}
/* profiles end */
Asset::getInstance()->addJs("/bitrix/js/sale/delivery.js");
if ($parentService && get_class($parentService) != 'Bitrix\\Sale\\Delivery\\Services\\Group') {
if ($ID > 0) {
$sDocTitle = str_replace(array("#NAME#", "#PARENT_NAME#"), array($fields["NAME"], $parentService->getName()), Loc::getMessage("SALE_DSE_EDIT_RECORD_PROFILE"));
} else {
$sDocTitle = str_replace("#PARENT_NAME#", $parentService->getName(), Loc::getMessage("SALE_DSE_NEW_RECORD_PROFILE"));
}
} else {
if ($isGroup) {
if ($ID > 0) {
$sDocTitle = str_replace("#NAME#", $fields["NAME"], Loc::getMessage("SALE_DSE_EDIT_GROUP"));
} else {
示例4: updateCampaign
}
if ($campaign['SETTINGS']['StatusModerate'] == Engine\YandexDirect::STATUS_NEW) {
$actionsList[] = array("ICON" => "delete", "TEXT" => Loc::getMessage("SEO_CAMPAIGN_DELETE"), "ACTION" => "if(confirm('" . \CUtil::JSEscape(Loc::getMessage('SEO_CAMPAIGN_DELETE_CONFIRM')) . "')) " . $adminList->ActionDoGroup($campaign['ID'], "delete", $archive ? "archive=1" : ""));
}
$row->AddActions($actionsList);
}
}
if ($archive) {
$aContext = array(array("ICON" => "btn_list", "TEXT" => GetMessage("SEO_CAMPAIGN_LIST_ACTIVE"), "LINK" => "seo_search_yandex_direct.php?lang=" . LANGUAGE_ID, "TITLE" => GetMessage("SEO_LIST_CAMPAIGN_ACTIVE_TITLE")));
} elseif ($bNeedAuth) {
$aContext = array(array("ICON" => "btn_archive", "TEXT" => GetMessage("SEO_LIST_INACTIVE"), "LINK" => "seo_search_yandex_direct.php?lang=" . LANGUAGE_ID . "&archive=1", "TITLE" => GetMessage("SEO_LIST_CAMPAIGN_INACTIVE_TITLE")));
} else {
$aContext = array(array("ICON" => "btn_new", "TEXT" => GetMessage("MAIN_ADD"), "LINK" => "seo_search_yandex_direct_edit.php?lang=" . LANGUAGE_ID, "TITLE" => GetMessage("MAIN_ADD")), array("ICON" => "btn_update", "TEXT" => GetMessage("SEO_CAMPAIGN_LIST_UPDATE_LIST"), "ONCLICK" => "updateCampaign(this)", "TITLE" => GetMessage("SEO_CAMPAIGN_LIST_UPDATE_TITLE")), array("ICON" => "btn_archive", "TEXT" => GetMessage("SEO_LIST_INACTIVE"), "LINK" => "seo_search_yandex_direct.php?lang=" . LANGUAGE_ID . "&archive=1", "TITLE" => GetMessage("SEO_LIST_CAMPAIGN_INACTIVE_TITLE")));
}
$adminList->AddAdminContextMenu($aContext);
$adminList->CheckListMode();
$APPLICATION->SetTitle($archive ? Loc::getMessage("SEO_YANDEX_DIRECT_TITLE_ARCHIVE") : Loc::getMessage("SEO_YANDEX_DIRECT_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<script type="text/javascript">
function updateCampaign(btn, campaignId)
{
if(btn.type == 'button')
{
if (!btn.name)
{
btn.name = 'template_preview';
}
BX.adminPanel.showWait(btn);
}
示例5: array
$arRowActions[] = array("ICON" => "delete", "TEXT" => GetMessage('SALE_REPORT_LIST_ROW_ACTIONS_DELETE_TEXT'), "ACTION" => "if(confirm('" . GetMessage("REPORT_DELETE_CONFIRM") . "')) " . $lReports->ActionDoGroup($arRes['ID'], "delete"));
}
// </editor-fold>
$lRow->AddActions($arRowActions);
$nReports++;
}
// Group actions
$lReports->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE")));
// Menu of actions.
$arContextMenu = array(array("TEXT" => GetMessage("SALE_REPORT_LIST_ADD_REPORT"), "LINK" => "sale_report_construct.php?lang=" . LANG, "TITLE" => GetMessage("SALE_REPORT_LIST_ADD_REPORT_TITLE"), "ICON" => "btn_new"));
// Attach "Menu of actions".
$lReports->AddAdminContextMenu($arContextMenu);
// Adding summary row.
$lReports->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $dbRepList->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
// Processing options or export to Excel.
$lReports->CheckListMode();
}
// </editor-fold>
// Page header
$APPLICATION->SetTitle(GetMessage("SALE_REPORT_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
// <editor-fold defaultstate="collapsed" desc="--------- Page output ---------">
if ($errorMessage) {
$errAdmMessage = new CAdminMessage(array("DETAILS" => $errorMessage, "TYPE" => "ERROR", "MESSAGE" => GetMessage('SALE_REPORT_ERROR_GETREPORTLIST'), "HTML" => true));
echo $errAdmMessage->Show();
} else {
?>
<?php
if ($nReports == 0) {
?>
示例6: htmlspecialcharsbx
$entityName = $shipment->getField('DELIVERY_NAME');
}
} else {
if ($arChangeRecord["ENTITY"] == 'PAYMENT') {
$payment = $paymentCollection->getItemById($arChangeRecord["ENTITY_ID"]);
if ($payment) {
$entityName = $payment->getField('PAY_SYSTEM_NAME');
}
}
}
}
$row->AddField("ENTITY_ID", htmlspecialcharsbx($entityName));
$arOperations[$arChangeRecord["TYPE"]] = $arRecord["NAME"];
}
if ($_REQUEST["table_id"] == $sTableHistory) {
$lAdminHistory->CheckListMode();
}
?>
<div id="order-history-sourse" style="/*display:none;*/">
<form name="find_form_history" method="GET" action="<?php
echo $APPLICATION->GetCurPageParam();
?>
">
<input type="hidden" name="ID" value="<?php
echo $ID;
?>
">
<input type="hidden" name="table_id" value="<?php
echo $sTableHistory;
?>
示例7: catch
if ($user["ID"] > 0) {
$cache_users[$arr_order["USER_ID"]] = $user["NAME"] . " " . $user["LAST_NAME"];
$arr_order["USER_ID"] = $cache_users[$arr_order["USER_ID"]];
}
} else {
$arr_order["USER_ID"] = $cache_users[$arr_order["USER_ID"]];
}
$row =& $o_table->AddRow($var_ID, $arr_order);
$name = Loc::getMessage("DEVTM_BEGATEWAY_ORDER_TITLE") . $arr_order["ID"];
$row->AddViewField("ID", "<a href=\"begateway_transaction_payment.php?ID=" . $var_ID . "&lang=" . LANG . "\" >" . $name . "</a>");
/*$action = array(
array(
"ICON" => "edit",
"DEFAULT" => true,
"TEXT" => Loc::getMessage("DEVTM_BEGATEWAY_CONTEXT_MENU_MESSAGE"),
"ACTION" => $o_table->ActionRedirect("begateway_transaction_payment.php?ID=".$var_ID."&lang=".LANG)
),
);
$row->AddActions($action);*/
}
$o_table->AddAdminContextMenu();
$o_table->CheckListMode();
$APPLICATION->SetTitle(Loc::getMessage("DEVTM_BEGATEWAY_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$o_table->DisplayList();
} catch (Exception $e) {
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
CAdminMessage::ShowMessage(array("MESSAGE" => $e->getMessage(), "TYPE" => "ERROR"));
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
示例8: buildList
//.........这里部分代码省略.........
$visibleColumns = array_values($visibleColumns);
$visibleColumns = array_merge($visibleColumns, array_keys($this->tableColumnsMap));
}
$className = static::getModel();
$visibleColumns[] = static::pk();
$sectionsVisibleColumns[] = static::sectionPk();
$raw = array('SELECT' => $visibleColumns, 'FILTER' => $this->arFilter, 'SORT' => $sort);
foreach ($this->fields as $name => $settings) {
if (isset($settings['VIRTUAL']) and $settings['VIRTUAL'] == true) {
$key = array_search($name, $visibleColumns);
unset($visibleColumns[$key]);
unset($this->arFilter[$name]);
unset($sort[$name]);
}
if (isset($settings['FORCE_SELECT']) and $settings['FORCE_SELECT'] == true) {
$visibleColumns[] = $name;
}
}
$visibleColumns = array_unique($visibleColumns);
$sectionsVisibleColumns = array_unique($sectionsVisibleColumns);
// Поля для селекта (перевернутый массив)
$listSelect = array_flip($visibleColumns);
foreach ($this->fields as $code => $settings) {
$widget = $this->createWidgetForField($code);
$widget->changeGetListOptions($this->arFilter, $visibleColumns, $sort, $raw);
// Множественные поля не должны быть в селекте
if (!empty($settings['MULTIPLE'])) {
unset($listSelect[$code]);
}
}
// Поля для селекта (множественные поля отфильтрованы)
$listSelect = array_flip($listSelect);
if ($sectionEditHelper) {
$mixedData = $this->getMixedData($sectionsVisibleColumns, $visibleColumns, $sort, $raw);
$res = new \CDbResult();
$res->InitFromArray($mixedData);
$res = new \CAdminResult($res, $this->getListTableID());
$res->nSelectedCount = $this->totalRowsCount;
// используем кастомный NavStart что бы определить правильное количество страниц и элементов в списке
$this->customNavStart($res);
$this->list->NavText($res->GetNavPrint(Loc::getMessage("PAGES")));
while ($data = $res->NavNext(false)) {
$this->modifyRowData($data);
if ($data['IS_SECTION']) {
list($link, $name) = $this->getRow($data, $this->getHelperClass(AdminSectionEditHelper::className()));
$row = $this->list->AddRow('s' . $data[$this->pk()], $data, $link, $name);
foreach ($this->sectionFields as $code => $settings) {
if (in_array($code, $sectionsVisibleColumns)) {
$this->addRowSectionCell($row, $code, $data);
}
}
$row->AddActions($this->getRowActions($data, true));
} else {
$this->modifyRowData($data);
list($link, $name) = $this->getRow($data);
// объединение полей элемента с полями раздела
foreach ($this->tableColumnsMap as $elementCode => $sectionCode) {
if (isset($data[$elementCode])) {
$data[$sectionCode] = $data[$elementCode];
}
}
$row = $this->list->AddRow($data[$this->pk()], $data, $link, $name);
foreach ($this->fields as $code => $settings) {
$this->addRowCell($row, $code, $data, isset($this->tableColumnsMap[$code]) ? $this->tableColumnsMap[$code] : false);
}
$row->AddActions($this->getRowActions($data));
}
}
} else {
$res = $this->getData($className, $this->arFilter, $listSelect, $sort, $raw);
$res = new \CAdminResult($res, $this->getListTableID());
$res->NavStart();
$this->list->NavText($res->GetNavPrint(Loc::getMessage("PAGES")));
while ($data = $res->NavNext(false)) {
$this->modifyRowData($data);
list($link, $name) = $this->getRow($data);
$row = $this->list->AddRow($data[$this->pk()], $data, $link, $name);
foreach ($this->fields as $code => $settings) {
$this->addRowCell($row, $code, $data);
}
$row->AddActions($this->getRowActions($data));
}
}
$this->list->AddFooter($this->getFooter($res));
$this->list->AddGroupActionTable($this->getGroupActions(), $this->groupActionsParams);
$this->list->AddAdminContextMenu($this->getContextMenu());
$this->list->BeginPrologContent();
echo $this->prologHtml;
$this->list->EndPrologContent();
$this->list->BeginEpilogContent();
echo $this->epilogHtml;
$this->list->EndEpilogContent();
// добавляем ошибки в CAdminList для режимов list и frame
if (in_array($_GET['mode'], array('list', 'frame')) && is_array($this->getErrors())) {
foreach ($this->getErrors() as $error) {
$this->list->addGroupError($error);
}
}
$this->list->CheckListMode();
}
示例9: getData
/**
* Основной цикл отображения списка. Этапы:
* <ul>
* <li> Вывод заголовков страницы </li>
* <li> Определение списка видимых колонок и колонок, участвующих в выборке. </li>
* <li> Создание виджета для каждого поля выборки </li>
* <li> Модификация параметров запроса каждым из виджетов </li>
* <li> Выборка данных </li>
* <li> Вывод строк таблицы. Во время итерации по строкам возможна модификация данных строки. </li>
* <li> Отрисовка футера таблиы, добавление контекстного меню </li>
* </ul>
*
* @param array $sort Настройки сортировки.
*
* @see AdminListHelper::getList();
* @see AdminListHelper::modifyRowData();
* @see AdminListHelper::addRowCell();
* @see AdminListHelper::addRow();
* @see HelperWidget::changeGetListOptions();
*/
public function getData($sort)
{
$this->setContext(AdminListHelper::OP_GET_DATA_BEFORE);
$this->list->AddHeaders($this->arHeader);
$visibleColumns = $this->list->GetVisibleHeaderColumns();
$className = static::getModel();
$visibleColumns[] = static::pk();
$raw = array('SELECT' => $visibleColumns, 'FILTER' => $this->arFilter, 'SORT' => $sort);
foreach ($this->fields as $name => $settings) {
if (isset($settings['VIRTUAL']) and $settings['VIRTUAL'] == true) {
$key = array_search($name, $visibleColumns);
unset($visibleColumns[$key]);
unset($this->arFilter[$name]);
unset($sort[$name]);
}
if (isset($settings['FORCE_SELECT']) and $settings['FORCE_SELECT'] == true) {
$visibleColumns[] = $name;
}
}
$visibleColumns = array_unique($visibleColumns);
// Поля для селекта (перевернутый массив)
$listSelect = array_flip($visibleColumns);
foreach ($this->fields as $code => $settings) {
$widget = $this->createWidgetForField($code);
$widget->changeGetListOptions($this->arFilter, $visibleColumns, $sort, $raw);
// Множественные поля не должны быть в селекте
if (!empty($settings['MULTIPLE'])) {
unset($listSelect[$code]);
}
}
// Поля для селекта (множественные поля отфильтрованы)
$listSelect = array_flip($listSelect);
$res = $this->getList($className, $this->arFilter, $listSelect, $sort, $raw);
$res = new \CAdminResult($res, $this->getListTableID());
$res->NavStart();
$this->list->NavText($res->GetNavPrint(Loc::getMessage("PAGES")));
while ($data = $res->NavNext(false)) {
$this->modifyRowData($data);
list($link, $name) = $this->addRow($data);
$row = $this->list->AddRow($data[$this->pk()], $data, $link, $name);
foreach ($this->fields as $code => $settings) {
$this->addRowCell($row, $code, $data);
}
$actions = $this->addRowActions($data);
$row->AddActions($actions);
}
$this->addFooter($res);
$this->list->AddFooter($this->footer);
$this->list->AddGroupActionTable($this->groupActionsList, $this->groupActionsParams);
$this->list->AddAdminContextMenu($this->contextMenu);
$this->list->BeginPrologContent();
echo $this->prologHtml;
$this->list->EndPrologContent();
$this->list->BeginEpilogContent();
echo $this->epilogHtml;
$this->list->EndEpilogContent();
$this->list->CheckListMode();
}