本文整理汇总了PHP中CBPDocument::getDocumentAdminPage方法的典型用法代码示例。如果您正苦于以下问题:PHP CBPDocument::getDocumentAdminPage方法的具体用法?PHP CBPDocument::getDocumentAdminPage怎么用?PHP CBPDocument::getDocumentAdminPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBPDocument
的用法示例。
在下文中一共展示了CBPDocument::getDocumentAdminPage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTaskList
/**
* @param array $params Input params.
* @param int $n Offset.
* @param \CRestServer $server Rest server instance.
* @return array
* @throws AccessException
*/
public static function getTaskList($params, $n, $server)
{
global $USER;
self::checkAdminPermissions();
$params = array_change_key_case($params, CASE_UPPER);
$fields = array('ID' => 'ID', 'WORKFLOW_ID' => 'WORKFLOW_ID', 'DOCUMENT_NAME' => 'DOCUMENT_NAME', 'DESCRIPTION' => 'DESCRIPTION', 'NAME' => 'NAME', 'MODIFIED' => 'MODIFIED', 'WORKFLOW_STARTED' => 'WORKFLOW_STARTED', 'WORKFLOW_STARTED_BY' => 'WORKFLOW_STARTED_BY', 'OVERDUE_DATE' => 'OVERDUE_DATE', 'WORKFLOW_TEMPLATE_ID' => 'WORKFLOW_TEMPLATE_ID', 'WORKFLOW_TEMPLATE_NAME' => 'WORKFLOW_TEMPLATE_NAME', 'WORKFLOW_STATE' => 'WORKFLOW_STATE', 'STATUS' => 'STATUS', 'USER_ID' => 'USER_ID', 'USER_STATUS' => 'USER_STATUS', 'MODULE_ID' => 'MODULE_ID', 'ENTITY' => 'ENTITY', 'DOCUMENT_ID' => 'DOCUMENT_ID');
$select = static::getSelect($params['SELECT'], $fields, array('ID', 'WORKFLOW_ID', 'DOCUMENT_NAME', 'NAME'));
$select = array_merge(array('MODULE', 'ENTITY', 'DOCUMENT_ID'), $select);
$filter = static::getFilter($params['FILTER'], $fields);
$order = static::getOrder($params['ORDER'], $fields);
$currentUserId = (int) $USER->getId();
$targetUserId = isset($filter['USER_ID']) ? (int) $filter['USER_ID'] : 0;
if ($targetUserId !== $currentUserId && !\CBPHelper::checkUserSubordination($currentUserId, $targetUserId)) {
self::checkAdminPermissions();
}
$iterator = \CBPTaskService::getList($order, $filter, false, static::getNavData($n), $select);
$result = array();
while ($row = $iterator->fetch()) {
if (isset($row['MODIFIED'])) {
$row['MODIFIED'] = \CRestUtil::convertDateTime($row['MODIFIED']);
}
if (isset($row['WORKFLOW_STARTED'])) {
$row['WORKFLOW_STARTED'] = \CRestUtil::convertDateTime($row['WORKFLOW_STARTED']);
}
if (isset($row['OVERDUE_DATE'])) {
$row['OVERDUE_DATE'] = \CRestUtil::convertDateTime($row['OVERDUE_DATE']);
}
$row['DOCUMENT_URL'] = \CBPDocument::getDocumentAdminPage(array($row['MODULE_ID'], $row['ENTITY'], $row['DOCUMENT_ID']));
$result[] = $row;
}
return $result;
}