本文整理汇总了PHP中CAdminList::displayList方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminList::displayList方法的具体用法?PHP CAdminList::displayList怎么用?PHP CAdminList::displayList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminList
的用法示例。
在下文中一共展示了CAdminList::displayList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
$tableId = 'tbl_user_vars_list';
$adminSort = new CAdminSorting($tableId, 'NAME', 'asc');
$adminList = new CAdminList($tableId, $adminSort);
$adminList->addHeaders($headers);
if ($request->getQuery('mode') != 'list') {
$context = new CAdminContextMenu($contextMenu);
}
$queryBuilder = new Entity\Query(Model\VarsTable::getEntity());
$queryBuilder->setSelect(array('ID', 'NAME', 'CODE', 'DESCRIPTION', 'VALUE'))->setFilter(array('GROUP_ID' => $dataGroup['ID']));
$sortBy = $request->getQuery('by') ? strtoupper($request->getQuery('by')) : 'ID';
$sortOrder = $request->getQuery('order') ?: 'asc';
$queryBuilder->setOrder(array($sortBy => $sortOrder));
$resultData = new CAdminResult($queryBuilder->exec(), $tableId);
$resultData->navStart();
$adminList->navText($resultData->getNavPrint(Loc::getMessage('PAGES')));
while ($item = $resultData->fetch()) {
$row = $adminList->addRow($item['ID'], $item);
$actions = array();
$actions[] = array('ICON' => 'edit', 'TEXT' => Loc::GetMessage('USER_VARS_ACTION_EDIT_VAR'), 'ACTION' => $adminList->actionRedirect('user_vars_edit.php?ID=' . $item['ID'] . '&GROUP_ID=' . $dataGroup['ID']));
$actions[] = array('ICON' => 'delete', 'TEXT' => Loc::getMessage('USER_VARS_ACTION_DELETE_VAR'), 'ACTION' => "if(confirm('" . Loc::getMessage('USER_VARS_DELETE_VAR_CONFIRM') . "')) " . $adminList->actionRedirect('user_vars_edit.php?action=delete&ID=' . $item['ID'] . '&GROUP_ID=' . $dataGroup['ID'] . '&' . bitrix_sessid_get()));
$row->addActions($actions);
}
$prologType = $request->getQuery('mode') == 'list' ? 'prolog_js' : 'prolog';
require sprintf('%s%s', getenv('DOCUMENT_ROOT'), $includePath[$prologType]);
if ($prologType != 'prolog_js') {
$context->show();
}
$adminList->checkListMode();
$adminList->displayList();
$epilogType = $request->getQuery('mode') == 'list' ? 'epilog_js' : 'epilog';
require sprintf('%s%s', getenv('DOCUMENT_ROOT'), $includePath[$epilogType]);
示例2: getMessage
$arActions[] = array('ICON' => '', 'TEXT' => getMessage($abtest['ACTIVE'] == 'Y' ? 'ABTEST_BTN_STOP' : 'ABTEST_BTN_START'), 'ACTION' => $abtest['ENABLED'] == 'T' ? $lAdmin->actionRedirect('abtest_edit.php?ID=' . $abtest['ID'] . '&lang=' . LANG) : "if (confirm('" . CUtil::JSEscape(getMessage($abtest['ACTIVE'] == 'Y' ? 'ABTEST_STOP_CONFIRM' : 'ABTEST_START_CONFIRM')) . "')) " . $lAdmin->actionDoGroup($abtest['ID'], $abtest['ACTIVE'] == 'Y' ? 'stop' : 'start'));
}
if ($abtest['USER_ID']) {
$arActions[] = array('ICON' => '', 'DEFAULT' => 'Y', 'TEXT' => getMessage('ABTEST_BTN_REPORT'), 'ACTION' => $lAdmin->actionRedirect('abtest_report.php?ID=' . $abtest['ID'] . '&lang=' . LANG));
}
$arActions[] = array('SEPARATOR' => 'Y');
$arActions[] = array('ICON' => 'edit', 'DEFAULT' => $abtest['USER_ID'] ? 'N' : 'Y', 'TEXT' => getMessage('ABTEST_BTN_EDIT'), 'ACTION' => $lAdmin->actionRedirect('abtest_edit.php?ID=' . $abtest['ID'] . '&lang=' . LANG));
}
$arActions[] = array('ICON' => 'delete', 'TEXT' => getMessage('ABTEST_BTN_DELETE'), 'ACTION' => "if (confirm('" . CUtil::JSEscape(getMessage('ABTEST_DELETE_CONFIRM')) . "')) " . $lAdmin->actionDoGroup($abtest['ID'], 'delete'));
if ($isAdmin) {
$row->addActions($arActions);
}
}
$lAdmin->checkListMode();
$APPLICATION->setTitle(getMessage('ABTEST_LIST_TITLE'));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<div style="background-color: #fff; border: 1px solid #ced7d8; padding: 20px; ">
<table style="border-spacing: 0px; "><tr>
<td style="border: none; padding: 15px; "><img src="/bitrix/images/abtest/ab-icon-big.png"></td>
<td style="border: none; padding: 15px; max-width: 800px; "><?php
echo getMessage('ABTEST_LIST_DESCR');
?>
</td>
</tr></table>
</div><br>
<?php
$lAdmin->displayList();
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";