本文整理汇总了PHP中CAdminList::EndPrologContent方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminList::EndPrologContent方法的具体用法?PHP CAdminList::EndPrologContent怎么用?PHP CAdminList::EndPrologContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminList
的用法示例。
在下文中一共展示了CAdminList::EndPrologContent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
} elseif ($action == 'delegate' && !empty($_REQUEST['delegate_to'])) {
CBPDocument::delegateTasks($userId, $_REQUEST['delegate_to'], $taskId, $errors);
}
}
if ($errors) {
foreach ($errors as $error) {
$actionErrorMessage .= $error . PHP_EOL;
}
}
unset($ids, $errors, $action, $status, $taskId, $userId);
}
}
if ($actionErrorMessage) {
$lAdmin->BeginPrologContent();
CAdminMessage::ShowMessage($actionErrorMessage);
$lAdmin->EndPrologContent();
}
$arAddHeaders = array(array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "DOCUMENT_NAME", "content" => GetMessage("BPATL_DOCUMENT_NAME"), "default" => false, "sort" => "DOCUMENT_NAME"), array("id" => "NAME", "content" => GetMessage("BPATL_NAME"), "sort" => "NAME", "default" => true), array("id" => "DESCRIPTION", "content" => GetMessage("BPATL_DESCR"), "default" => true, "sort" => "DESCRIPTION"), array("id" => "DESCRIPTION_FULL", "content" => GetMessage("BPATL_DESCR_FULL"), "default" => false, "sort" => "DESCRIPTION"), array("id" => "MODIFIED", "content" => GetMessage("BPATL_MODIFIED"), "sort" => "MODIFIED", "default" => true), array("id" => "OVERDUE_DATE", "content" => GetMessage("BPATL_OVERDUE_DATE"), "default" => false, "sort" => "OVERDUE_DATE"), array("id" => "WORKFLOW_STARTED", "content" => GetMessage("BPATL_STARTED"), "default" => false, "sort" => "WORKFLOW_STARTED"), array("id" => "WORKFLOW_STARTED_BY", "content" => GetMessage("BPATL_STARTED_BY"), "default" => false, "sort" => "WORKFLOW_STARTED_BY"), array("id" => "WORKFLOW_NAME", "content" => GetMessage("BPATL_WORKFLOW_NAME"), "default" => true, "sort" => "WORKFLOW_TEMPLATE_NAME"), array("id" => "WORKFLOW_STATE", "content" => GetMessage("BPATL_WORKFLOW_STATE"), "default" => true, "sort" => "WORKFLOW_STATE"));
if ($allowAdminAccess) {
$arAddHeaders[] = array("id" => "USER", "content" => GetMessage("BPATL_USER"), "default" => true, "sort" => "USER_ID");
}
$lAdmin->AddHeaders($arAddHeaders);
$arVisibleColumns = $lAdmin->GetVisibleHeaderColumns();
$arSelectFields = array("ID", "WORKFLOW_ID", "ACTIVITY", "ACTIVITY_NAME", "MODIFIED", "OVERDUE_DATE", "NAME", "DESCRIPTION", "PARAMETERS", 'DOCUMENT_NAME', 'WORKFLOW_STARTED', 'WORKFLOW_STARTED_BY', 'OVERDUE_DATE', 'WORKFLOW_TEMPLATE_NAME', 'WORKFLOW_STATE');
if (in_array("USER", $arVisibleColumns) && $allowAdminAccess) {
$arSelectFields[] = "USER_ID";
}
$dbResultList = CBPTaskService::GetList(array($by => $order), $arFilter, false, false, $arSelectFields);
$dbResultList = new CAdminResult($dbResultList, $sTableID);
$dbResultList->NavStart();
$lAdmin->NavText($dbResultList->GetNavPrint(GetMessage("BPATL_NAV")));
示例2: 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();
}
示例3: GetMessage
<a href="event_list.php?lang=<?php
echo LANG;
?>
&find_adv_id=<?php
echo $f_ID;
?>
&find_adv_id_exact_match=Y&find_money1=0.0001&set_filter=Y"><?php
echo GetMessage("STAT_ALL_FINANCE_EVENTS");
?>
</a>
<br><br>
<?php
} else {
CAdminMessage::ShowMessage(GetMessage("STAT_NO_PERMISSIONS"));
}
$lAdmin_tab2->EndPrologContent();
if ($_REQUEST["table_id"] == $sTableID_tab2) {
create_event_list($lAdmin_tab2, true);
}
if ($_REQUEST["table_id"] == $sTableID_tab2) {
$lAdmin_tab2->CheckListMode();
}
}
//$STAT_RIGHT > "M"
$oSort_tab3 = new CAdminSorting($sTableID_tab3, "s_def", "desc");
$lAdmin_tab3 = new CAdminList($sTableID_tab3, $oSort_tab3);
$lAdmin_tab3->InitFilter($arFilterFields);
if (strlen($strError) > 0) {
CAdminMessage::ShowMessage($strError);
} elseif ($site_filter == "Y" && $_REQUEST["table_id"] == $sTableID_tab3) {
CAdminMessage::ShowMessage(GetMessage("STAT_NO_DATA"));
示例4: 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();
}