本文整理汇总了PHP中CBPDocument::GetWorkflowTemplatesForDocumentType方法的典型用法代码示例。如果您正苦于以下问题:PHP CBPDocument::GetWorkflowTemplatesForDocumentType方法的具体用法?PHP CBPDocument::GetWorkflowTemplatesForDocumentType怎么用?PHP CBPDocument::GetWorkflowTemplatesForDocumentType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBPDocument
的用法示例。
在下文中一共展示了CBPDocument::GetWorkflowTemplatesForDocumentType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
// Headers initialization -->
$arResult['HEADERS'] = array(array('id' => 'ID', 'name' => GetMessage('CRM_COLUMN_ID'), 'sort' => 'id', 'default' => false, 'editable' => false, 'type' => 'int', 'class' => 'minimal'), array('id' => 'CONTACT_SUMMARY', 'name' => GetMessage('CRM_COLUMN_CONTACT'), 'sort' => 'full_name', 'default' => true, 'editable' => false));
// Dont display activities in INTERNAL mode.
if (!$bInternal) {
$arResult['HEADERS'][] = array('id' => 'ACTIVITY_ID', 'name' => GetMessage('CRM_COLUMN_ACTIVITY'), 'sort' => 'nearest_activity', 'default' => true);
}
$arResult['HEADERS'] = array_merge($arResult['HEADERS'], array(array('id' => 'CONTACT_COMPANY', 'name' => GetMessage('CRM_COLUMN_CONTACT_COMPANY_INFO'), 'sort' => 'company_title', 'default' => true, 'editable' => false), array('id' => 'PHOTO', 'name' => GetMessage('CRM_COLUMN_PHOTO'), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'NAME', 'name' => GetMessage('CRM_COLUMN_NAME'), 'sort' => 'name', 'default' => false, 'editable' => true, 'class' => 'username'), array('id' => 'LAST_NAME', 'name' => GetMessage('CRM_COLUMN_LAST_NAME'), 'sort' => 'last_name', 'default' => false, 'editable' => true, 'class' => 'username'), array('id' => 'SECOND_NAME', 'name' => GetMessage('CRM_COLUMN_SECOND_NAME'), 'sort' => 'second_name', 'default' => false, 'editable' => true, 'class' => 'username'), array('id' => 'BIRTHDATE', 'name' => GetMessage('CRM_COLUMN_BIRTHDATE'), 'sort' => 'BIRTHDATE', 'default' => false, 'editable' => true, 'type' => 'date'), array('id' => 'POST', 'name' => GetMessage('CRM_COLUMN_POST'), 'sort' => 'post', 'default' => false, 'editable' => true), array('id' => 'COMPANY_ID', 'name' => GetMessage('CRM_COLUMN_COMPANY_ID'), 'sort' => 'company_title', 'default' => false, 'editable' => false), array('id' => 'TYPE_ID', 'name' => GetMessage('CRM_COLUMN_TYPE'), 'sort' => 'type_id', 'default' => false, 'editable' => array('items' => CCrmStatus::GetStatusList('CONTACT_TYPE')), 'type' => 'list')));
$CCrmFieldMulti->PrepareListHeaders($arResult['HEADERS']);
if ($isInExportMode) {
$CCrmFieldMulti->ListAddHeaders($arResult['HEADERS']);
}
$arResult['HEADERS'] = array_merge($arResult['HEADERS'], array(array('id' => 'ASSIGNED_BY', 'name' => GetMessage('CRM_COLUMN_ASSIGNED_BY'), 'sort' => 'assigned_by', 'default' => true, 'editable' => false, 'class' => 'username'), array('id' => 'FULL_ADDRESS', 'name' => EntityAddress::getFullAddressLabel(), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'ADDRESS', 'name' => $addressLabels['ADDRESS'], 'sort' => 'address', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_2', 'name' => $addressLabels['ADDRESS_2'], 'sort' => 'address_2', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_CITY', 'name' => $addressLabels['CITY'], 'sort' => 'address_city', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_REGION', 'name' => $addressLabels['REGION'], 'sort' => 'address_region', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_PROVINCE', 'name' => $addressLabels['PROVINCE'], 'sort' => 'address_province', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_POSTAL_CODE', 'name' => $addressLabels['POSTAL_CODE'], 'sort' => 'address_postal_code', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_COUNTRY', 'name' => $addressLabels['COUNTRY'], 'sort' => 'address_country', 'default' => false, 'editable' => false), array('id' => 'COMMENTS', 'name' => GetMessage('CRM_COLUMN_COMMENTS'), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'SOURCE_ID', 'name' => GetMessage('CRM_COLUMN_SOURCE'), 'sort' => 'source_id', 'default' => false, 'editable' => array('items' => CCrmStatus::GetStatusList('SOURCE')), 'type' => 'list'), array('id' => 'SOURCE_DESCRIPTION', 'name' => GetMessage('CRM_COLUMN_SOURCE_DESCRIPTION'), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'EXPORT', 'name' => GetMessage('CRM_COLUMN_EXPORT'), 'type' => 'checkbox', 'default' => false, 'editable' => true), array('id' => 'CREATED_BY', 'name' => GetMessage('CRM_COLUMN_CREATED_BY'), 'sort' => 'created_by', 'default' => false, 'editable' => false, 'class' => 'username'), array('id' => 'DATE_CREATE', 'name' => GetMessage('CRM_COLUMN_DATE_CREATE'), 'sort' => 'date_create', 'default' => false, 'class' => 'date'), array('id' => 'MODIFY_BY', 'name' => GetMessage('CRM_COLUMN_MODIFY_BY'), 'sort' => 'modify_by', 'default' => false, 'editable' => false, 'class' => 'username'), array('id' => 'DATE_MODIFY', 'name' => GetMessage('CRM_COLUMN_DATE_MODIFY'), 'sort' => 'date_modify', 'default' => false, 'class' => 'date')));
$CCrmUserType->ListAddHeaders($arResult['HEADERS']);
if (IsModuleInstalled('bizproc')) {
$arBPData = CBPDocument::GetWorkflowTemplatesForDocumentType(array('crm', 'CCrmDocumentContact', 'CONTACT'));
$arDocumentStates = CBPDocument::GetDocumentStates(array('crm', 'CCrmDocumentContact', 'CONTACT'), null);
foreach ($arBPData as $arBP) {
if (!CBPDocument::CanUserOperateDocumentType(CBPCanUserOperateOperation::StartWorkflow, $userID, array('crm', 'CCrmDocumentContact', 'CONTACT'), array('UserGroups' => $CCrmBizProc->arCurrentUserGroups, 'DocumentStates' => $arDocumentStates, 'WorkflowTemplateId' => $arBP['ID'], 'UserIsAdmin' => $isAdmin, 'CRMPermission' => $arResult['PERMS']['READ']))) {
continue;
}
$arResult['HEADERS'][] = array('id' => 'BIZPROC_' . $arBP['ID'], 'name' => $arBP['NAME'], 'sort' => false, 'default' => false, 'editable' => false);
}
}
unset($arHeader);
// <-- Headers initialization
// Try to extract user action data -->
// We have to extract them before call of CGridOptions::GetFilter() overvise the custom filter will be corrupted.
$actionData = array('METHOD' => $_SERVER['REQUEST_METHOD'], 'ACTIVE' => false);
if (check_bitrix_sessid()) {
$postAction = 'action_button_' . $arResult['GRID_ID'];
示例2: LocalRedirect
if ($_GET['error'] === $errorID) {
if (!isset($_SESSION[$errorID])) {
LocalRedirect(CHTTP::urlDeleteParams($APPLICATION->GetCurPage(), array('error')));
}
$strError = strval($_SESSION[$errorID]);
unset($_SESSION[$errorID]);
if ($strError !== '') {
ShowError(htmlspecialcharsbx($strError));
}
}
}
$grid_options = new CGridOptions($arResult["GRID_ID"]);
$grid_columns = $grid_options->GetVisibleColumns();
$grid_sort = $grid_options->GetSorting(array("sort" => array("name" => "asc")));
if ($arResult["IBLOCK"]["BIZPROC"] == "Y" && CModule::IncludeModule('bizproc')) {
$arDocumentTemplates = CBPDocument::GetWorkflowTemplatesForDocumentType(BizProcDocument::generateDocumentComplexType($arParams["IBLOCK_TYPE_ID"], $arResult["IBLOCK_ID"]));
$arResult["BIZPROC"] = "Y";
} else {
$arDocumentTemplates = array();
$arResult["BIZPROC"] = "N";
}
/* FIELDS */
$arResult["ELEMENTS_HEADERS"] = array();
$arSelect = array("ID", "IBLOCK_ID");
$arProperties = array();
$arResult["FIELDS"] = $arListFields = $obList->GetFields();
foreach ($arListFields as $FIELD_ID => $arField) {
if (!count($grid_columns) || in_array($FIELD_ID, $grid_columns)) {
if (substr($FIELD_ID, 0, 9) == "PROPERTY_") {
$arProperties[] = $FIELD_ID;
} else {
示例3: htmlspecialcharsex
"id" => "CATALOG_GROUP_".$arCatalogGroup["ID"],
"content" => htmlspecialcharsex(!empty($arCatalogGroup["NAME_LANG"]) ? $arCatalogGroup["NAME_LANG"] : $arCatalogGroup["NAME"]),
"align" => "right",
"sort" => "CATALOG_PRICE_".$arCatalogGroup["ID"],
);
$arCatGroup[$arCatalogGroup["ID"]] = $arCatalogGroup;
}
$arCatExtra = array();
$db_extras = CExtra::GetList(array("NAME" =>"ASC"));
while ($extras = $db_extras->Fetch())
$arCatExtra[] = $extras;
}
if ($bBizproc)
{
$arWorkflowTemplates = CBPDocument::GetWorkflowTemplatesForDocumentType(array(MODULE_ID, ENTITY, DOCUMENT_TYPE));
foreach ($arWorkflowTemplates as $arTemplate)
{
$arHeader[] = array(
"id" => "WF_".$arTemplate["ID"],
"content" => $arTemplate["NAME"],
);
}
$arHeader[] = array(
"id" => "BIZPROC",
"content" => GetMessage("IBLIST_A_BP_H"),
);
$arHeader[] = array(
"id" => "LOCK_STATUS",
"content" => GetMessage("IBLIST_A_LOCK_STATUS"),
"default" => true,
示例4: GetMessage
<td><?php
echo GetMessage("IB_E_ELEMENT_DELETE");
?>
</td>
<td>
<input type="text" name="ELEMENT_DELETE" size="40" maxlength="100" value="<?php
echo htmlspecialcharsbx($arMessages["ELEMENT_DELETE"]);
?>
">
</td>
</tr>
<?php
if ($bBizprocTab) {
$tabControl->BeginNextTab();
if (!isset($arWorkflowTemplates)) {
$arWorkflowTemplates = CBPDocument::GetWorkflowTemplatesForDocumentType(array("iblock", "CIBlockDocument", "iblock_" . $ID));
}
?>
<tr>
<td colspan="2">
<?php
if (count($arWorkflowTemplates) > 0) {
?>
<table border="0" cellspacing="0" cellpadding="0" class="internal">
<tr class="heading">
<td><?php
echo GetMessage("IB_E_BP_NAME");
?>
</td>
<td><?php
echo GetMessage("IB_E_BP_CHANGED");
示例5: array
// Headers initialization -->
$arResult['HEADERS'] = array(array('id' => 'ID', 'name' => GetMessage('CRM_COLUMN_ID'), 'sort' => 'id', 'default' => false, 'editable' => false, 'type' => 'int', 'class' => 'minimal'), array('id' => 'LEAD_SUMMARY', 'name' => GetMessage('CRM_COLUMN_LEAD'), 'sort' => 'title', 'default' => true, 'editable' => false), array('id' => 'STATUS_ID', 'name' => GetMessage('CRM_COLUMN_STATUS'), 'sort' => 'status_sort', 'default' => true, 'editable' => array('items' => $arResult['STATUS_LIST_WRITE']), 'type' => 'list'));
// Dont display activities in INTERNAL mode.
if (!$bInternal) {
$arResult['HEADERS'][] = array('id' => 'ACTIVITY_ID', 'name' => GetMessage('CRM_COLUMN_ACTIVITY'), 'sort' => 'nearest_activity', 'default' => true);
}
$arResult['HEADERS'] = array_merge($arResult['HEADERS'], array(array('id' => 'LEAD_FORMATTED_NAME', 'name' => GetMessage('CRM_COLUMN_FULL_NAME'), 'sort' => 'last_name', 'default' => true, 'editable' => false), array('id' => 'TITLE', 'name' => GetMessage('CRM_COLUMN_TITLE'), 'sort' => 'title', 'default' => false, 'editable' => true), array('id' => 'NAME', 'name' => GetMessage('CRM_COLUMN_NAME'), 'sort' => 'name', 'default' => false, 'editable' => true, 'class' => 'username'), array('id' => 'SECOND_NAME', 'name' => GetMessage('CRM_COLUMN_SECOND_NAME'), 'sort' => 'second_name', 'default' => false, 'editable' => true, 'class' => 'username'), array('id' => 'LAST_NAME', 'name' => GetMessage('CRM_COLUMN_LAST_NAME'), 'sort' => 'last_name', 'default' => false, 'editable' => true, 'class' => 'username'), array('id' => 'BIRTHDATE', 'name' => GetMessage('CRM_COLUMN_BIRTHDATE'), 'sort' => 'BIRTHDATE', 'default' => false, 'editable' => true, 'type' => 'date'), array('id' => 'DATE_CREATE', 'name' => GetMessage('CRM_COLUMN_DATE_CREATE'), 'sort' => 'date_create', 'default' => true, 'editable' => false, 'class' => 'date'), array('id' => 'SOURCE_ID', 'name' => GetMessage('CRM_COLUMN_SOURCE'), 'sort' => 'source_id', 'default' => false, 'editable' => array('items' => CCrmStatus::GetStatusList('SOURCE')), 'type' => 'list')));
$CCrmFieldMulti->PrepareListHeaders($arResult['HEADERS']);
if ($isInExportMode) {
$CCrmFieldMulti->ListAddHeaders($arResult['HEADERS']);
}
$arResult['HEADERS'] = array_merge($arResult['HEADERS'], array(array('id' => 'ASSIGNED_BY', 'name' => GetMessage('CRM_COLUMN_ASSIGNED_BY'), 'sort' => 'assigned_by', 'default' => true, 'editable' => false, 'class' => 'username'), array('id' => 'STATUS_DESCRIPTION', 'name' => GetMessage('CRM_COLUMN_STATUS_DESCRIPTION'), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'SOURCE_DESCRIPTION', 'name' => GetMessage('CRM_COLUMN_SOURCE_DESCRIPTION'), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'CREATED_BY', 'name' => GetMessage('CRM_COLUMN_CREATED_BY'), 'sort' => 'created_by', 'default' => false, 'editable' => false, 'class' => 'username'), array('id' => 'DATE_MODIFY', 'name' => GetMessage('CRM_COLUMN_DATE_MODIFY'), 'sort' => 'date_modify', 'default' => false, 'class' => 'date'), array('id' => 'MODIFY_BY', 'name' => GetMessage('CRM_COLUMN_MODIFY_BY'), 'sort' => 'modify_by', 'default' => false, 'editable' => false, 'class' => 'username'), array('id' => 'COMPANY_TITLE', 'name' => GetMessage('CRM_COLUMN_COMPANY_TITLE'), 'sort' => 'company_title', 'default' => false, 'editable' => true), array('id' => 'POST', 'name' => GetMessage('CRM_COLUMN_POST'), 'sort' => 'post', 'default' => false, 'editable' => true), array('id' => 'FULL_ADDRESS', 'name' => EntityAddress::getFullAddressLabel(), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'ADDRESS', 'name' => $addressLabels['ADDRESS'], 'sort' => 'address', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_2', 'name' => $addressLabels['ADDRESS_2'], 'sort' => 'address_2', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_CITY', 'name' => $addressLabels['CITY'], 'sort' => 'address_city', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_REGION', 'name' => $addressLabels['REGION'], 'sort' => 'address_region', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_PROVINCE', 'name' => $addressLabels['PROVINCE'], 'sort' => 'address_province', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_POSTAL_CODE', 'name' => $addressLabels['POSTAL_CODE'], 'sort' => 'address_postal_code', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_COUNTRY', 'name' => $addressLabels['COUNTRY'], 'sort' => 'address_country', 'default' => false, 'editable' => false), array('id' => 'COMMENTS', 'name' => GetMessage('CRM_COLUMN_COMMENTS'), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'SUM', 'name' => GetMessage('CRM_COLUMN_SUM'), 'sort' => 'opportunity_account', 'default' => false, 'editable' => false, 'align' => 'right'), array('id' => 'OPPORTUNITY', 'name' => GetMessage('CRM_COLUMN_OPPORTUNITY_2'), 'sort' => 'opportunity', 'default' => false, 'editable' => true, 'align' => 'right'), array('id' => 'CURRENCY_ID', 'name' => GetMessage('CRM_COLUMN_CURRENCY_ID'), 'sort' => 'currency_id', 'default' => false, 'editable' => array('items' => CCrmCurrencyHelper::PrepareListItems()), 'type' => 'list'), array('id' => 'PRODUCT_ID', 'name' => GetMessage('CRM_COLUMN_PRODUCT_ID'), 'sort' => false, 'default' => $isInExportMode, 'editable' => false, 'type' => 'list')));
$CCrmUserType->ListAddHeaders($arResult['HEADERS']);
$arBPData = array();
if (IsModuleInstalled('bizproc')) {
$arBPData = CBPDocument::GetWorkflowTemplatesForDocumentType(array('crm', 'CCrmDocumentLead', 'LEAD'));
$arDocumentStates = CBPDocument::GetDocumentStates(array('crm', 'CCrmDocumentLead', 'LEAD'), null);
foreach ($arBPData as $arBP) {
if (!CBPDocument::CanUserOperateDocumentType(CBPCanUserOperateOperation::ViewWorkflow, $userID, array('crm', 'CCrmDocumentLead', 'LEAD'), array('UserGroups' => $CCrmBizProc->arCurrentUserGroups, 'DocumentStates' => $arDocumentStates, 'WorkflowTemplateId' => $arBP['ID'], 'UserIsAdmin' => $isAdmin, 'CRMPermission' => $arResult['PERMS']['READ']))) {
continue;
}
$arResult['HEADERS'][] = array('id' => 'BIZPROC_' . $arBP['ID'], 'name' => $arBP['NAME'], 'sort' => false, 'default' => false, 'editable' => false);
}
}
// <-- Headers initialization
// Try to extract user action data -->
// We have to extract them before call of CGridOptions::GetFilter() or the custom filter will be corrupted.
$actionData = array('METHOD' => $_SERVER['REQUEST_METHOD'], 'ACTIVE' => false);
if (check_bitrix_sessid()) {
$postAction = 'action_button_' . $arResult['GRID_ID'];
$getAction = 'action_' . $arResult['GRID_ID'];
示例6: array
$rsElements = CIBlockElement::GetList(array(), $arFilter, false, false, array("ID"));
while ($arElement = $rsElements->Fetch()) {
if ($lists_perm >= CListPermissions::CAN_WRITE || CIBlockElementRights::UserHasRightTo($arIBlock["ID"], $arElement["ID"], "element_delete")) {
$obElement->Delete($arElement["ID"]);
}
}
}
if (!isset($_POST["AJAX_CALL"])) {
LocalRedirect($arResult["~LIST_URL"]);
}
}
$grid_options = new CGridOptions($arResult["GRID_ID"]);
$grid_columns = $grid_options->GetVisibleColumns();
$grid_sort = $grid_options->GetSorting(array("sort" => array("name" => "asc")));
if ($arResult["IBLOCK"]["BIZPROC"] == "Y" && CModule::IncludeModule('bizproc')) {
$arDocumentTemplates = CBPDocument::GetWorkflowTemplatesForDocumentType(array("iblock", "CIBlockDocument", "iblock_" . $arResult["IBLOCK_ID"]));
$arResult["BIZPROC"] = "Y";
} else {
$arDocumentTemplates = array();
$arResult["BIZPROC"] = "N";
}
/* FIELDS */
$arResult["ELEMENTS_HEADERS"] = array();
$arSelect = array("ID", "IBLOCK_ID");
$arProperties = array();
$arResult["FIELDS"] = $arListFields = $obList->GetFields();
foreach ($arListFields as $FIELD_ID => $arField) {
if (!count($grid_columns) || in_array($FIELD_ID, $grid_columns)) {
if (substr($FIELD_ID, 0, 9) == "PROPERTY_") {
$arProperties[] = $FIELD_ID;
} else {