- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/classes/general/cml2.php
- Класс: CIBlockCMLExport
- Вызов: CIBlockCMLExport::ExportSectionsProperties
function ExportSectionsProperties($arUserFields)
{
if(empty($arUserFields))
return;
fwrite($this->fp, "tt<".GetMessage("IBLOCK_XML2_GROUPS_PROPERTIES").">n");
foreach($arUserFields as $FIELD_ID => $arField)
{
fwrite($this->fp, "ttt<".GetMessage("IBLOCK_XML2_PROPERTY").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_ID").">".htmlspecialcharsbx($arField["XML_ID"])."".GetMessage("IBLOCK_XML2_ID").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_NAME").">".htmlspecialcharsbx($FIELD_ID)."".GetMessage("IBLOCK_XML2_NAME").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_SORT").">".htmlspecialcharsbx($arField["SORT"])."".GetMessage("IBLOCK_XML2_SORT").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_MULTIPLE").">".($arField["MULTIPLE"] == "Y"? "true": "false")."".GetMessage("IBLOCK_XML2_MULTIPLE").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_BX_PROPERTY_TYPE").">".htmlspecialcharsbx($arField["USER_TYPE_ID"])."".GetMessage("IBLOCK_XML2_BX_PROPERTY_TYPE").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_BX_IS_REQUIRED").">".($arField["MANDATORY"] == "Y"? "true": "false")."".GetMessage("IBLOCK_XML2_BX_IS_REQUIRED").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_BX_FILTER").">".($arField["SHOW_FILTER"] == "Y"? "true": "false")."".GetMessage("IBLOCK_XML2_BX_FILTER").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_BX_SHOW_IN_LIST").">".($arField["SHOW_IN_LIST"] == "Y"? "true": "false")."".GetMessage("IBLOCK_XML2_BX_SHOW_IN_LIST").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_BX_EDIT_IN_LIST").">".($arField["EDIT_IN_LIST"] == "Y"? "true": "false")."".GetMessage("IBLOCK_XML2_BX_EDIT_IN_LIST").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_BX_SEARCH").">".($arField["IS_SEARCHABLE"] == "Y"? "true": "false")."".GetMessage("IBLOCK_XML2_BX_SEARCH").">n");
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_BX_SETTINGS").">".htmlspecialcharsbx(serialize($arField["SETTINGS"]))."".GetMessage("IBLOCK_XML2_BX_SETTINGS").">n");
if (is_callable(array($arField["USER_TYPE"]['CLASS_NAME'], 'getlist')))
{
fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_CHOICE_VALUES").">n");
$rsEnum = call_user_func_array(
array($arField["USER_TYPE"]["CLASS_NAME"], "getlist"),
array(
$arField,
)
);
if (is_object($rsEnum))
{
while ($arEnum = $rsEnum->GetNext())
{
fwrite($this->fp,
"ttttt<".GetMessage("IBLOCK_XML2_CHOICE").">n"
.$this->formatXMLNode(6, GetMessage("IBLOCK_XML2_ID"), $arEnum["XML_ID"])
.$this->formatXMLNode(6, GetMessage("IBLOCK_XML2_VALUE"), $arEnum["VALUE"])
.$this->formatXMLNode(6, GetMessage("IBLOCK_XML2_BY_DEFAULT"), ($arEnum["DEF"] == "Y" ? "true" : "false"))
.$this->formatXMLNode(6, GetMessage("IBLOCK_XML2_SORT"), intval($arEnum["SORT"]))
."ttttt".GetMessage("IBLOCK_XML2_CHOICE").">n"
);
}
}
unset($rsEnum);
fwrite($this->fp, "tttt".GetMessage("IBLOCK_XML2_CHOICE_VALUES").">n");
}
fwrite($this->fp, "ttt".GetMessage("IBLOCK_XML2_PROPERTY").">n");
}
fwrite($this->fp, "tt".GetMessage("IBLOCK_XML2_GROUPS_PROPERTIES").">n");
}