当前位置: 首页>>代码示例>>PHP>>正文


PHP CIBlockParameters::GetIBlockTypes方法代码示例

本文整理汇总了PHP中CIBlockParameters::GetIBlockTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockParameters::GetIBlockTypes方法的具体用法?PHP CIBlockParameters::GetIBlockTypes怎么用?PHP CIBlockParameters::GetIBlockTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CIBlockParameters的用法示例。


在下文中一共展示了CIBlockParameters::GetIBlockTypes方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetFieldInputControlOptions

    function GetFieldInputControlOptions($documentType, &$arFieldType, $jsFunctionName, &$value)
    {
        $result = "";
        static $arDocumentFieldTypes = array();
        if (!array_key_exists($documentType, $arDocumentFieldTypes)) {
            $arDocumentFieldTypes[$documentType] = self::GetDocumentFieldTypes($documentType);
        }
        if (!array_key_exists($arFieldType["Type"], $arDocumentFieldTypes[$documentType]) || !$arDocumentFieldTypes[$documentType][$arFieldType["Type"]]["Complex"]) {
            return "";
        }
        if ($arFieldType["Type"] == "E:EList") {
            if (is_array($value)) {
                reset($value);
                $valueTmp = intval(current($value));
            } else {
                $valueTmp = intval($value);
            }
            $iblockId = 0;
            if ($valueTmp > 0) {
                $dbResult = CIBlockElement::GetList(array(), array("ID" => $valueTmp), false, false, array("ID", "IBLOCK_ID"));
                if ($arResult = $dbResult->Fetch()) {
                    $iblockId = $arResult["IBLOCK_ID"];
                }
            }
            if ($iblockId <= 0 && intval($arFieldType["Options"]) > 0) {
                $iblockId = intval($arFieldType["Options"]);
            }
            $defaultIBlockId = 0;
            $result .= '<select id="WFSFormOptionsX" onchange="' . htmlspecialcharsbx($jsFunctionName) . '(this.options[this.selectedIndex].value)">';
            $arIBlockType = CIBlockParameters::GetIBlockTypes();
            foreach ($arIBlockType as $iblockTypeId => $iblockTypeName) {
                $result .= '<optgroup label="' . $iblockTypeName . '">';
                $dbIBlock = CIBlock::GetList(array("SORT" => "ASC"), array("TYPE" => $iblockTypeId, "ACTIVE" => "Y"));
                while ($arIBlock = $dbIBlock->GetNext()) {
                    $result .= '<option value="' . $arIBlock["ID"] . '"' . ($arIBlock["ID"] == $iblockId ? " selected" : "") . '>' . $arIBlock["NAME"] . '</option>';
                    if ($defaultIBlockId <= 0 || $arIBlock["ID"] == $iblockId) {
                        $defaultIBlockId = $arIBlock["ID"];
                    }
                }
                $result .= '</optgroup>';
            }
            $result .= '</select><!--__defaultOptionsValue:' . $defaultIBlockId . '--><!--__modifyOptionsPromt:' . GetMessage("IBD_DOCUMENT_MOPROMT") . '-->';
            $arFieldType["Options"] = $defaultIBlockId;
        } elseif ($arFieldType["Type"] == "select") {
            $valueTmp = $arFieldType["Options"];
            if (!is_array($valueTmp)) {
                $valueTmp = array($valueTmp => $valueTmp);
            }
            $str = '';
            foreach ($valueTmp as $k => $v) {
                if (is_array($v) && count($v) == 2) {
                    $v1 = array_values($v);
                    $k = $v1[0];
                    $v = $v1[1];
                }
                if ($k != $v) {
                    $str .= '[' . $k . ']' . $v;
                } else {
                    $str .= $v;
                }
                $str .= "\n";
            }
            $result .= '<textarea id="WFSFormOptionsX" rows="5" cols="30">' . htmlspecialcharsbx($str) . '</textarea><br />';
            $result .= GetMessage("IBD_DOCUMENT_XFORMOPTIONS1") . '<br />';
            $result .= GetMessage("IBD_DOCUMENT_XFORMOPTIONS2") . '<br />';
            $result .= '<script type="text/javascript">
				function WFSFormOptionsXFunction()
				{
					var result = {};
					var i, id, val, str = document.getElementById("WFSFormOptionsX").value;

					var arr = str.split(/[\\r\\n]+/);
					var p, re = /\\[([^\\]]+)\\].+/;
					for (i in arr)
					{
						str = arr[i].replace(/^\\s+|\\s+$/g, \'\');
						if (str.length > 0)
						{
							id = str.match(re);
							if (id)
							{
								p = str.indexOf(\']\');
								id = id[1];
								val = str.substr(p + 1);
							}
							else
							{
								val = str;
								id = val;
							}
							result[id] = val;
						}
					}

					return result;
				}
				</script>';
            $result .= '<input type="button" onclick="' . htmlspecialcharsbx($jsFunctionName) . '(WFSFormOptionsXFunction())" value="' . GetMessage("IBD_DOCUMENT_XFORMOPTIONS3") . '">';
        }
        return $result;
//.........这里部分代码省略.........
开发者ID:spas-viktor,项目名称:books,代码行数:101,代码来源:iblockdocument.php

示例2: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
/** @var array $arCurrentValues */
if (!CModule::IncludeModule("iblock")) {
    return;
}
$arTypesEx = CIBlockParameters::GetIBlockTypes(array("-" => " "));
$arIBlocks = array();
$db_iblock = CIBlock::GetList(array("SORT" => "ASC"), array("SITE_ID" => $_REQUEST["site"], "TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : ""));
while ($arRes = $db_iblock->Fetch()) {
    $arIBlocks[$arRes["ID"]] = $arRes["NAME"];
}
$arSorts = array("ASC" => GetMessage("T_IBLOCK_DESC_ASC"), "DESC" => GetMessage("T_IBLOCK_DESC_DESC"));
$arSortFields = array("ID" => GetMessage("T_IBLOCK_DESC_FID"), "NAME" => GetMessage("T_IBLOCK_DESC_FNAME"), "ACTIVE_FROM" => GetMessage("T_IBLOCK_DESC_FACT"), "SORT" => GetMessage("T_IBLOCK_DESC_FSORT"), "TIMESTAMP_X" => GetMessage("T_IBLOCK_DESC_FTSAMP"));
$arProperty_LNS = array();
$rsProp = CIBlockProperty::GetList(array("sort" => "asc", "name" => "asc"), array("ACTIVE" => "Y", "IBLOCK_ID" => isset($arCurrentValues["IBLOCK_ID"]) ? $arCurrentValues["IBLOCK_ID"] : $arCurrentValues["ID"]));
while ($arr = $rsProp->Fetch()) {
    $arProperty[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"];
    if (in_array($arr["PROPERTY_TYPE"], array("L", "N", "S"))) {
        $arProperty_LNS[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"];
    }
}
$arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("AJAX_MODE" => array(), "IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypesEx, "DEFAULT" => "news", "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_ID"), "TYPE" => "LIST", "VALUES" => $arIBlocks, "DEFAULT" => '={$_REQUEST["ID"]}', "ADDITIONAL_VALUES" => "Y", "REFRESH" => "Y"), "NEWS_COUNT" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_CONT"), "TYPE" => "STRING", "DEFAULT" => "20"), "SORT_BY1" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBORD1"), "TYPE" => "LIST", "DEFAULT" => "ACTIVE_FROM", "VALUES" => $arSortFields, "ADDITIONAL_VALUES" => "Y"), "SORT_ORDER1" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBBY1"), "TYPE" => "LIST", "DEFAULT" => "DESC", "VALUES" => $arSorts, "ADDITIONAL_VALUES" => "Y"), "SORT_BY2" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBORD2"), "TYPE" => "LIST", "DEFAULT" => "SORT", "VALUES" => $arSortFields, "ADDITIONAL_VALUES" => "Y"), "SORT_ORDER2" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBBY2"), "TYPE" => "LIST", "DEFAULT" => "ASC", "VALUES" => $arSorts, "ADDITIONAL_VALUES" => "Y"), "FILTER_NAME" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_FILTER"), "TYPE" => "STRING", "DEFAULT" => ""), "FIELD_CODE" => CIBlockParameters::GetFieldCode(GetMessage("IBLOCK_FIELD"), "DATA_SOURCE"), "PROPERTY_CODE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_LNS, "ADDITIONAL_VALUES" => "Y"), "CHECK_DATES" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_CHECK_DATES"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "DETAIL_URL" => CIBlockParameters::GetPathTemplateParam("DETAIL", "DETAIL_URL", GetMessage("T_IBLOCK_DESC_DETAIL_PAGE_URL"), "", "URL_TEMPLATES"), "PREVIEW_TRUNCATE_LEN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_PREVIEW_TRUNCATE_LEN"), "TYPE" => "STRING", "DEFAULT" => ""), "ACTIVE_DATE_FORMAT" => CIBlockParameters::GetDateFormat(GetMessage("T_IBLOCK_DESC_ACTIVE_DATE_FORMAT"), "ADDITIONAL_SETTINGS"), "SET_TITLE" => array(), "SET_BROWSER_TITLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BNL_SET_BROWSER_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "SET_META_KEYWORDS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BNL_SET_META_KEYWORDS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "SET_META_DESCRIPTION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BNL_SET_META_DESCRIPTION"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "SET_LAST_MODIFIED" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BNL_SET_LAST_MODIFIED"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "INCLUDE_IBLOCK_INTO_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_INCLUDE_IBLOCK_INTO_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "ADD_SECTIONS_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_ADD_SECTIONS_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "HIDE_LINK_WHEN_NO_DETAIL" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_HIDE_LINK_WHEN_NO_DETAIL"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "PARENT_SECTION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("IBLOCK_SECTION_ID"), "TYPE" => "STRING", "DEFAULT" => ''), "PARENT_SECTION_CODE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("IBLOCK_SECTION_CODE"), "TYPE" => "STRING", "DEFAULT" => ''), "INCLUDE_SUBSECTIONS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BNL_INCLUDE_SUBSECTIONS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "CACHE_TIME" => array("DEFAULT" => 36000000), "CACHE_FILTER" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("IBLOCK_CACHE_FILTER"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BNL_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y")));
CIBlockParameters::AddPagerSettings($arComponentParameters, GetMessage("T_IBLOCK_DESC_PAGER_NEWS"), true, true, true, $arCurrentValues["PAGER_BASE_LINK_ENABLE"] === "Y");
CIBlockParameters::Add404Settings($arComponentParameters, $arCurrentValues);
开发者ID:webgksupport,项目名称:alpina,代码行数:28,代码来源:.parameters.php

示例3: GetMessage

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule("iblock")) {
    return;
}
$arIBlockType = CIBlockParameters::GetIBlockTypes(array("-" => GetMessage("CP_BCI1_CREATE")));
$arUGroupsEx = array();
$dbUGroups = CGroup::GetList($by = "c_sort", $order = "asc");
while ($arUGroups = $dbUGroups->Fetch()) {
    $arUGroupsEx[$arUGroups["ID"]] = $arUGroups["NAME"];
}
$rsSite = CSite::GetList($by = "sort", $order = "asc", $arFilter = array("ACTIVE" => "Y"));
$arSites = array("-" => GetMessage("CP_BCI1_CURRENT"));
while ($arSite = $rsSite->GetNext()) {
    $arSites[$arSite["LID"]] = $arSite["NAME"];
}
$arAction = array("N" => GetMessage("CP_BCI1_NONE"), "A" => GetMessage("CP_BCI1_DEACTIVATE"), "D" => GetMessage("CP_BCI1_DELETE"));
$arComponentParameters = array("GROUPS" => array("PICTURE" => array("NAME" => GetMessage("CP_BCI1_PICTURE")), "TRANSLIT" => array("NAME" => GetMessage("CP_BCI1_TRANSLIT"))), "PARAMETERS" => array("IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BCI1_IBLOCK_TYPE"), "TYPE" => "LIST", "VALUES" => $arIBlockType), "SITE_LIST" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BCI1_SITE_LIST"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arSites), "INTERVAL" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BCI1_INTERVAL"), "TYPE" => "STRING", "DEFAULT" => 30), "GROUP_PERMISSIONS" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BCI1_GROUP_PERMISSIONS"), "TYPE" => "LIST", "VALUES" => $arUGroupsEx, "DEFAULT" => array(1), "MULTIPLE" => "Y"), "USE_OFFERS" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_USE_OFFERS"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "FORCE_OFFERS" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_FORCE_OFFERS"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "USE_IBLOCK_TYPE_ID" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_USE_IBLOCK_TYPE_ID"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SKIP_ROOT_SECTION" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_SKIP_ROOT_SECTION"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "ELEMENT_ACTION" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_ELEMENT_ACTION"), "TYPE" => "LIST", "VALUES" => $arAction, "DEFAULT" => "D"), "SECTION_ACTION" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_SECTION_ACTION"), "TYPE" => "LIST", "VALUES" => $arAction, "DEFAULT" => "D"), "FILE_SIZE_LIMIT" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_FILE_SIZE_LIMIT"), "TYPE" => "STRING", "DEFAULT" => 200 * 1024), "USE_CRC" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_USE_CRC"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "USE_ZIP" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_USE_ZIP"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "SKIP_SOURCE_CHECK" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_SKIP_SOURCE_CHECK"), "TYPE" => "CHECKBOX", "DEFAULT" => "N")));
$arComponentParameters["PARAMETERS"]["USE_IBLOCK_PICTURE_SETTINGS"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_USE_IBLOCK_PICTURE_SETTINGS"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y");
if ($arCurrentValues["USE_IBLOCK_PICTURE_SETTINGS"] !== "Y") {
    $arComponentParameters["PARAMETERS"]["GENERATE_PREVIEW"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_GENERATE_PREVIEW"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y");
    if ($arCurrentValues["GENERATE_PREVIEW"] != "N") {
        $arComponentParameters["PARAMETERS"]["PREVIEW_WIDTH"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_PREVIEW_WIDTH"), "TYPE" => "STRING", "DEFAULT" => 100);
        $arComponentParameters["PARAMETERS"]["PREVIEW_HEIGHT"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_PREVIEW_HEIGHT"), "TYPE" => "STRING", "DEFAULT" => 100);
    }
    $arComponentParameters["PARAMETERS"]["DETAIL_RESIZE"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_DETAIL_RESIZE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y");
    if ($arCurrentValues["DETAIL_RESIZE"] != "N") {
        $arComponentParameters["PARAMETERS"]["DETAIL_WIDTH"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_DETAIL_WIDTH"), "TYPE" => "STRING", "DEFAULT" => 300);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:.parameters.php

示例4:

<?php

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die;
}
/**
 * @var array               $arCurrentValues
 * @global CUserTypeManager $USER_FIELD_MANAGER
 */
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\Loader;
Loc::loadLanguageFile(__FILE__);
global $USER_FIELD_MANAGER;
if (!Loader::includeModule('iblock')) {
    return;
}
$iBlockTypeList = CIBlockParameters::GetIBlockTypes();
$iBlockCollection = CIBlock::GetList(['sort' => 'asc'], ['TYPE' => $arCurrentValues['IBLOCK_TYPE'], 'ACTIVE' => 'Y']);
while ($arr = $iBlockCollection->Fetch()) {
    $iBlockList[$arr['ID']] = '[' . $arr['ID'] . '] ' . $arr['NAME'];
}
$userFieldPropertyList = [];
$userFieldList = $USER_FIELD_MANAGER->GetUserFields('IBLOCK_' . $arCurrentValues['IBLOCK_ID'] . '_SECTION');
foreach ($userFieldList as $FIELD_NAME => $userField) {
    $userFieldPropertyList[$FIELD_NAME] = $userField['LIST_COLUMN_LABEL'] ? $userField['LIST_COLUMN_LABEL'] : $FIELD_NAME;
}
$arComponentParameters = ['GROUPS' => [], 'PARAMETERS' => ['IBLOCK_TYPE' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('CC_IBSL_IBLOCK_TYPE'), 'TYPE' => 'LIST', 'VALUES' => $iBlockTypeList, 'REFRESH' => 'Y'], 'IBLOCK_ID' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('CC_IBSL_IBLOCK_ID'), 'TYPE' => 'LIST', 'ADDITIONAL_VALUES' => 'Y', 'VALUES' => $iBlockList, 'REFRESH' => 'Y'], 'SECTION_ID' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('CC_IBSL_SECTION_ID'), 'TYPE' => 'STRING', 'DEFAULT' => '={$_REQUEST["SECTION_ID"]}'], 'SECTION_CODE' => ['PARENT' => 'BASE', 'NAME' => Loc::getMessage('CC_IBSL_SECTION_CODE'), 'TYPE' => 'STRING', 'DEFAULT' => ''], 'FILTER_NAME' => ['PARENT' => 'DATA_SOURCE', 'NAME' => Loc::getMessage('CC_IBSL_FILTER_NAME'), 'TYPE' => 'STRING', 'DEFAULT' => ''], 'SECTION_URL' => CIBlockParameters::GetPathTemplateParam('SECTION', 'SECTION_URL', Loc::getMessage('CC_IBSL_SECTION_URL'), '', 'URL_TEMPLATES'), 'COUNT_ELEMENTS' => ['PARENT' => 'DATA_SOURCE', 'NAME' => Loc::getMessage('CC_IBSL_COUNT_ELEMENTS'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y'], 'TOP_DEPTH' => ['PARENT' => 'DATA_SOURCE', 'NAME' => Loc::getMessage('CC_IBSL_TOP_DEPTH'), 'TYPE' => 'STRING', 'DEFAULT' => '2'], 'SECTION_FIELDS' => CIBlockParameters::GetSectionFieldCode(Loc::getMessage('CC_IBSL_SECTION_FIELDS'), 'DATA_SOURCE', []), 'SECTION_USER_FIELDS' => ['PARENT' => 'DATA_SOURCE', 'NAME' => Loc::getMessage('CC_IBSL_SECTION_USER_FIELDS'), 'TYPE' => 'LIST', 'MULTIPLE' => 'Y', 'ADDITIONAL_VALUES' => 'Y', 'VALUES' => $userFieldPropertyList], 'ADD_SECTIONS_CHAIN' => ['PARENT' => 'ADDITIONAL_SETTINGS', 'NAME' => Loc::getMessage('CC_IBSL_ADD_SECTIONS_CHAIN'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y'], 'CACHE_TIME' => ['DEFAULT' => 36000000], 'CACHE_GROUPS' => ['PARENT' => 'CACHE_SETTINGS', 'NAME' => Loc::getMessage('CC_IBSL_CACHE_GROUPS'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y']]];
开发者ID:Varfann,项目名称:bx-features,代码行数:27,代码来源:.parameters.php

示例5: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
use Bitrix\Main;
use Bitrix\Main\Localization\Loc;
Loc::loadMessages(__FILE__);
try {
    if (!Main\Loader::includeModule('iblock')) {
        throw new Main\LoaderException(Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_IBLOCK_MODULE_NOT_INSTALLED'));
    }
    $iblockTypes = \CIBlockParameters::GetIBlockTypes(array("-" => " "));
    $iblocks = array(0 => " ");
    if (isset($arCurrentValues['IBLOCK_TYPE']) && strlen($arCurrentValues['IBLOCK_TYPE'])) {
        $filter = array('TYPE' => $arCurrentValues['IBLOCK_TYPE'], 'ACTIVE' => 'Y');
        $rsIBlock = \CIBlock::GetList(array('SORT' => 'ASC'), $filter);
        while ($arIBlock = $rsIBlock->GetNext()) {
            $iblocks[$arIBlock['ID']] = $arIBlock['NAME'];
        }
    }
    $sortFields = array('ID' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_ID'), 'NAME' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_NAME'), 'ACTIVE_FROM' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_ACTIVE_FROM'), 'SORT' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_SORT'));
    $sortDirection = array('ASC' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_ASC'), 'DESC' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_DESC'));
    $arComponentParameters = array('GROUPS' => array(), 'PARAMETERS' => array('IBLOCK_TYPE' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_IBLOCK_TYPE'), 'TYPE' => 'LIST', 'VALUES' => $iblockTypes, 'DEFAULT' => '', 'REFRESH' => 'Y'), 'IBLOCK_ID' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_IBLOCK_ID'), 'TYPE' => 'LIST', 'VALUES' => $iblocks), 'SHOW_NAV' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SHOW_NAV'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'), 'COUNT' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_COUNT'), 'TYPE' => 'STRING', 'DEFAULT' => '0'), 'SORT_FIELD1' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_FIELD1'), 'TYPE' => 'LIST', 'VALUES' => $sortFields), 'SORT_DIRECTION1' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_DIRECTION1'), 'TYPE' => 'LIST', 'VALUES' => $sortDirection), 'SORT_FIELD2' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_FIELD2'), 'TYPE' => 'LIST', 'VALUES' => $sortFields), 'SORT_DIRECTION2' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('STANDARD_ELEMENTS_PARAMETERS_SORT_DIRECTION2'), 'TYPE' => 'LIST', 'VALUES' => $sortDirection), 'SEF_MODE' => array('index' => array('NAME' => GetMessage('STANDARD_ELEMENTS_PARAMETERS_INDEX_PAGE'), 'DEFAULT' => 'index.php', 'VARIABLES' => array()), 'detail' => array("NAME" => GetMessage('STANDARD_ELEMENTS_PARAMETERS_DETAIL_PAGE'), "DEFAULT" => 'detail/#ELEMENT_ID#/', "VARIABLES" => array('ELEMENT_ID'))), 'CACHE_TIME' => array('DEFAULT' => 3600)));
} catch (Main\LoaderException $e) {
    ShowError($e->getMessage());
}
开发者ID:belukov,项目名称:bx-components,代码行数:27,代码来源:.parameters.php

示例6: ShowMessage

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
use Bitrix\Main\Loader;
if (!Loader::includeModule('iblock')) {
    ShowMessage(GetMessage('IBLOCK_ERROR'));
    return;
}
$iblockExits = !empty($arCurrentValues['IBLOCK_ID']) && intval($arCurrentValues['IBLOCK_ID']) > 0;
$arIBlockType = CIBlockParameters::GetIBlockTypes(array('-' => ' '));
//Получение списка типов инфоблоков
$arIBlock = array();
$iblockFilter = !empty($arCurrentValues['IBLOCK_TYPE']) ? array('TYPE' => $arCurrentValues['IBLOCK_TYPE'], 'ACTIVE' => 'Y') : array('ACTIVE' => 'Y');
$dbIBlock = CIBlock::GetList(array('SORT' => 'ASC'), $iblockFilter);
//Получение списка инфоблока заданного типа
while ($arr = $dbIBlock->Fetch()) {
    $arIBlock[$arr['ID']] = '[' . $arr['ID'] . '] ' . $arr['NAME'];
}
unset($arr, $dbIBlock, $iblockFilter);
// Освобождаем переменные
/**
 * Формируем массив переменных
 */
$arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("SEF_MODE" => array(), "IBLOCK_TYPE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IT_IBLOCK_TYPE"), "TYPE" => "LIST", "ADDITIONAl_VALUES" => "Y", "VALUES" => $arIBlockType, "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IT_IBLOCK_ID"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlock, "REFRESH" => "Y"), "CACHE_TIME" => array("DEFAULT" => 360000000), "COUNT_ITEM_PAGE" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IT_COUNT_ITEM_PAGE"), "TYPE" => "STRING", "DEFAULT" => 4), "COUNT_ITEM" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IT_COUNT_ITEM"), "TYPE" => "STRING", "DEFAULT" => 16), "WIDTH_PICTURE_SMALL" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IT_WIDTH_PICTURE_SMALL"), "TYPE" => "STRING", "DEFAULT" => 360), "HEIGHT_PICTURE_SMALL" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IT_HEIGHT_PICTURE_SMALL "), "TYPE" => "STRING", "DEFAULT" => 240)));
开发者ID:Orendev,项目名称:bitrx.local,代码行数:26,代码来源:.parameters.php

示例7: GetMessage

/***********************************************
 ** @product OBX:Core Bitrix Module           **
 ** @authors                                  **
 **         Maksim S. Makarov aka pr0n1x      **
 ** @license Affero GPLv3                     **
 ** @mailto rootfavell@gmail.com              **
 ** @copyright 2013 DevTop                    **
 ***********************************************/
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule('iblock')) {
    return;
}
$arTypesEx = CIBlockParameters::GetIBlockTypes(array('__all__' => GetMessage('OBXCMPP_MIL_ALL_IBLOCKS')));
$arIBlockFilter = array();
if (isset($_REQUEST['site'])) {
    $arIBlockFilter['SITE_ID'] = $_REQUEST['site'];
}
$bAddTypeName2IBlocks = false;
if ($arCurrentValues['IBLOCK_TYPE'] != '__all__') {
    $arIBlockFilter['TYPE'] = $arCurrentValues['IBLOCK_TYPE'];
} else {
    $bAddTypeName2IBlocks = true;
}
$arIBlocks = array();
$arSelectedIBlockList = array();
$db_iblock = CIBlock::GetList(array('SORT' => 'ASC'), $arIBlockFilter);
while ($arRes = $db_iblock->Fetch()) {
    $arIBlocks[$arRes['ID']] = ($bAddTypeName2IBlocks ? $arTypesEx[$arRes['IBLOCK_TYPE_ID']] . ': ' : '') . $arRes['NAME'];
开发者ID:OpenBX,项目名称:obx.core,代码行数:30,代码来源:.parameters.php

示例8: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule("iblock")) {
    return;
}
$arTypesEx = CIBlockParameters::GetIBlockTypes();
$arIBlocks = array();
$db_iblock = CIBlock::GetList(array("SORT" => "ASC"), array("SITE_ID" => $_REQUEST["site"], "TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : ""));
while ($arRes = $db_iblock->Fetch()) {
    $arIBlocks[$arRes["ID"]] = $arRes["NAME"];
}
$arSorts = array("ASC" => GetMessage("T_IBLOCK_DESC_ASC"), "DESC" => GetMessage("T_IBLOCK_DESC_DESC"));
$arSortFields = array("ID" => GetMessage("T_IBLOCK_DESC_FID"), "NAME" => GetMessage("T_IBLOCK_DESC_FNAME"), "ACTIVE_FROM" => GetMessage("T_IBLOCK_DESC_FACT"), "SORT" => GetMessage("T_IBLOCK_DESC_FSORT"), "TIMESTAMP_X" => GetMessage("T_IBLOCK_DESC_FTSAMP"));
$arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypesEx, "DEFAULT" => "news", "REFRESH" => "Y"), "IBLOCKS" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_ID"), "TYPE" => "LIST", "VALUES" => $arIBlocks, "DEFAULT" => '', "MULTIPLE" => "Y"), "NEWS_COUNT" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_CONT"), "TYPE" => "STRING", "DEFAULT" => "20"), "FIELD_CODE" => CIBlockParameters::GetFieldCode(GetMessage("CP_BNL_FIELD_CODE"), "DATA_SOURCE"), "SORT_BY1" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBORD1"), "TYPE" => "LIST", "DEFAULT" => "ACTIVE_FROM", "VALUES" => $arSortFields, "ADDITIONAL_VALUES" => "Y"), "SORT_ORDER1" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBBY1"), "TYPE" => "LIST", "DEFAULT" => "DESC", "VALUES" => $arSorts, "ADDITIONAL_VALUES" => "Y"), "SORT_BY2" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBORD2"), "TYPE" => "LIST", "DEFAULT" => "SORT", "VALUES" => $arSortFields, "ADDITIONAL_VALUES" => "Y"), "SORT_ORDER2" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_IBBY2"), "TYPE" => "LIST", "DEFAULT" => "ASC", "VALUES" => $arSorts, "ADDITIONAL_VALUES" => "Y"), "DETAIL_URL" => CIBlockParameters::GetPathTemplateParam("DETAIL", "DETAIL_URL", GetMessage("IBLOCK_DETAIL_URL"), "", "URL_TEMPLATES"), "ACTIVE_DATE_FORMAT" => CIBlockParameters::GetDateFormat(GetMessage("T_IBLOCK_DESC_ACTIVE_DATE_FORMAT"), "ADDITIONAL_SETTINGS"), "CACHE_TIME" => array("DEFAULT" => 300), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BNL_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y")));
开发者ID:Satariall,项目名称:izurit,代码行数:17,代码来源:.parameters.php

示例9: while

<?php

use Bex\Bbc\Helpers\ComponentParameters;
use Bitrix\Iblock;
use Bitrix\Main\Localization\Loc;
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!\Bitrix\Main\Loader::includeModule('bex.bbc')) {
    return false;
}
Loc::loadMessages(__FILE__);
try {
    ComponentParameters::includeModules(['iblock']);
    $iblockTypes = CIBlockParameters::GetIBlockTypes([0 => '']);
    $iblocks = [0 => ''];
    $sections = [0 => ''];
    $elementProperties = [];
    if (isset($arCurrentValues['IBLOCK_TYPE']) && strlen($arCurrentValues['IBLOCK_TYPE'])) {
        $rsIblocks = Iblock\IblockTable::getList(['order' => ['SORT' => 'ASC', 'NAME' => 'ASC'], 'filter' => ['IBLOCK_TYPE_ID' => $arCurrentValues['IBLOCK_TYPE'], 'ACTIVE' => 'Y'], 'select' => ['ID', 'NAME']]);
        while ($iblock = $rsIblocks->fetch()) {
            $iblocks[$iblock['ID']] = $iblock['NAME'];
        }
    }
    if (isset($arCurrentValues['IBLOCK_ID']) && strlen($arCurrentValues['IBLOCK_ID'])) {
        $rsSections = Iblock\SectionTable::getList(['order' => ['SORT' => 'ASC', 'NAME' => 'ASC'], 'filter' => ['IBLOCK_ID' => $arCurrentValues['IBLOCK_ID'], 'ACTIVE' => 'Y'], 'select' => ['ID', 'NAME']]);
        while ($arSection = $rsSections->fetch()) {
            $sections[$arSection['ID']] = $arSection['NAME'];
        }
        $rsProperties = CIBlockProperty::GetList(['sort' => 'asc', 'name' => 'asc'], ['ACTIVE' => 'Y', 'IBLOCK_ID' => $arCurrentValues['IBLOCK_ID']]);
        while ($property = $rsProperties->Fetch()) {
开发者ID:bitrix-expert,项目名称:bbc,代码行数:31,代码来源:.parameters.php

示例10: Array

<?
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();

if(!CModule::IncludeModule("iblock"))
	return;

$arTypesEx = CIBlockParameters::GetIBlockTypes(Array("all"=>" "));

$arIBlocks=Array();
$db_iblock = CIBlock::GetList(Array("SORT"=>"ASC"), Array("SITE_ID"=>$_REQUEST["site"], "TYPE" => ($arCurrentValues["IBLOCK_TYPE"]!="all"?$arCurrentValues["IBLOCK_TYPE"]:"")));
while($arRes = $db_iblock->Fetch())
	$arIBlocks[$arRes["ID"]] = $arRes["NAME"];

$arComponentParameters = array(
	"GROUPS" => array(
	),
	"PARAMETERS" => array(
		"IS_SEF" => array(
			"PARENT" => "BASE",
			"NAME" => GetMessage("CP_BMS_IS_SEF"),
			"TYPE" => "CHECKBOX",
			"DEFAULT" => "N",
			"REFRESH" => "Y",
		),
		"SEF_BASE_URL" => array(
			"PARENT" => "BASE",
			"NAME"=>GetMessage("CP_BMS_SEF_BASE_URL"),
			"TYPE"=>"STRING",
			"DEFAULT"=>'/catalog/phone/',
		),
		"SECTION_PAGE_URL" => CIBlockParameters::GetPathTemplateParam(
开发者ID:raffiz,项目名称:my_home_tests,代码行数:31,代码来源:.parameters.php

示例11: GetFieldInputControlOptions

    public static function GetFieldInputControlOptions($documentType, &$arFieldType, $jsFunctionName, &$value)
    {
        $result = '';
        static $arDocumentFieldTypes = array();
        if (!array_key_exists($documentType, $arDocumentFieldTypes)) {
            $arDocumentFieldTypes[$documentType] = self::GetDocumentFieldTypes($documentType);
        }
        if (!array_key_exists($arFieldType['Type'], $arDocumentFieldTypes[$documentType]) || !$arDocumentFieldTypes[$documentType][$arFieldType['Type']]['Complex']) {
            return '';
        }
        if ($arFieldType['Type'] == 'UF:iblock_element' || $arFieldType['Type'] == 'UF:iblock_section') {
            if (is_array($value)) {
                reset($value);
                $valueTmp = intval(current($value));
            } else {
                $valueTmp = intval($value);
            }
            $iblockId = 0;
            if ($valueTmp > 0) {
                $dbResult = CIBlockElement::GetList(array(), array($arFieldType['Type'] == 'UF:iblock_section' ? 'SECTION_ID' : 'ID' => $valueTmp), false, false, array('ID', 'IBLOCK_ID'));
                if ($arResult = $dbResult->Fetch()) {
                    $iblockId = $arResult['IBLOCK_ID'];
                }
            }
            if ($iblockId <= 0 && intval($arFieldType['Options']) > 0) {
                $iblockId = intval($arFieldType['Options']);
            }
            $defaultIBlockId = 0;
            $result .= '<select id="WFSFormOptionsX" onchange="' . $jsFunctionName . '(this.options[this.selectedIndex].value)">';
            $arIBlockType = CIBlockParameters::GetIBlockTypes();
            foreach ($arIBlockType as $iblockTypeId => $iblockTypeName) {
                $result .= '<optgroup label="' . $iblockTypeName . '">';
                $dbIBlock = CIBlock::GetList(array('SORT' => 'ASC'), array('TYPE' => $iblockTypeId, 'ACTIVE' => 'Y'));
                while ($arIBlock = $dbIBlock->GetNext()) {
                    $result .= '<option value="' . $arIBlock['ID'] . '"' . ($arIBlock['ID'] == $iblockId ? ' selected="selected"' : '') . '>' . $arIBlock['NAME'] . '</option>';
                    if ($defaultIBlockId <= 0 || $arIBlock['ID'] == $iblockId) {
                        $defaultIBlockId = $arIBlock['ID'];
                    }
                }
                $result .= '</optgroup>';
            }
            $result .= '</select><!--__defaultOptionsValue:' . $defaultIBlockId . '--><!--__modifyOptionsPromt:' . GetMessage('CRM_DOCUMENT_IBLOCK') . '-->';
            $arFieldType['Options'] = $defaultIBlockId;
        } else {
            if ($arFieldType['Type'] == 'UF:crm_status') {
                $statusID = $arFieldType['Options'];
                $arEntityTypes = CCrmStatus::GetEntityTypes();
                $default = 'STATUS';
                $result .= '<select id="WFSFormOptionsX" onchange="' . $jsFunctionName . '(this.options[this.selectedIndex].value)">';
                foreach ($arEntityTypes as $arEntityType) {
                    $result .= '<option value="' . $arEntityType['ID'] . '"' . ($arEntityType['ID'] == $statusID ? ' selected="selected"' : '') . '>' . htmlspecialcharsbx($arEntityType['NAME']) . '</option>';
                    if ($arEntityType['ID'] == $statusID) {
                        $default = $arEntityType['ID'];
                    }
                }
                $result .= '</select><!--__defaultOptionsValue:' . $default . '--><!--__modifyOptionsPromt:' . GetMessage('CRM_DOCUMENT_CRM_STATUS') . '-->';
            } else {
                if ($arFieldType['Type'] == 'UF:crm') {
                    $arEntity = $arFieldType['Options'];
                    if (empty($arEntity)) {
                        $arEntity = array('LEAD' => 'Y', 'CONTACT' => 'Y', 'COMPANY' => 'Y', 'DEAL' => 'Y');
                    }
                    $result .= '<input type="checkbox" id="WFSFormOptionsXL" name="ENITTY[]" value="LEAD" ' . ($arEntity['LEAD'] == 'Y' ? 'checked="checked"' : '') . '> ' . GetMessage('CRM_DOCUMENT_CRM_ENTITY_TYPE_LEAD') . ' <br/>';
                    $result .= '<input type="checkbox" id="WFSFormOptionsXC"  name="ENITTY[]" value="CONTACT" ' . ($arEntity['CONTACT'] == 'Y' ? 'checked="checked"' : '') . '> ' . GetMessage('CRM_DOCUMENT_CRM_ENTITY_TYPE_CONTACT') . '<br/>';
                    $result .= '<input type="checkbox" id="WFSFormOptionsXCO" name="ENITTY[]" value="COMPANY" ' . ($arEntity['COMPANY'] == 'Y' ? 'checked="checked"' : '') . '> ' . GetMessage('CRM_DOCUMENT_CRM_ENTITY_TYPE_COMPANY') . '<br/>';
                    $result .= '<input type="checkbox" id="WFSFormOptionsXD"  name="ENITTY[]" value="DEAL" ' . ($arEntity['DEAL'] == 'Y' ? 'checked="checked"' : '') . '> ' . GetMessage('CRM_DOCUMENT_CRM_ENTITY_TYPE_DEAL') . '<br/>';
                    $result .= '<input type="button" onclick="' . $jsFunctionName . '(WFSFormOptionsXCRM())" value="' . GetMessage('CRM_DOCUMENT_CRM_ENTITY_OK') . '" />';
                    $result .= '<script>
					function WFSFormOptionsXCRM()
					{
						var a = {};
						a["LEAD"] = BX("WFSFormOptionsXL").checked ? "Y" : "N";
						a["CONTACT"] = BX("WFSFormOptionsXC").checked ? "Y" : "N";
						a["COMPANY"] = BX("WFSFormOptionsXCO").checked ? "Y" : "N";
						a["DEAL"] = BX("WFSFormOptionsXD").checked ? "Y" : "N";
						return a;
					}
				</script>';
                    $result .= '<!--__modifyOptionsPromt:' . GetMessage('CRM_DOCUMENT_CRM_ENTITY') . '-->';
                } elseif ($arFieldType["Type"] == "select") {
                    $valueTmp = $arFieldType["Options"];
                    if (!is_array($valueTmp)) {
                        $valueTmp = array($valueTmp => $valueTmp);
                    }
                    $str = '';
                    foreach ($valueTmp as $k => $v) {
                        if (is_array($v) && count($v) == 2) {
                            $v1 = array_values($v);
                            $k = $v1[0];
                            $v = $v1[1];
                        }
                        if ($k != $v) {
                            $str .= '[' . $k . ']' . $v;
                        } else {
                            $str .= $v;
                        }
                        $str .= "\n";
                    }
                    $result .= '<textarea id="WFSFormOptionsX" rows="5" cols="30">' . htmlspecialcharsbx($str) . '</textarea><br />';
                    $result .= GetMessage("IBD_DOCUMENT_XFORMOPTIONS1") . '<br />';
//.........这里部分代码省略.........
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:crm_document.php


注:本文中的CIBlockParameters::GetIBlockTypes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。