- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/classes/general/comp_parameters.php
- Класс: CIBlockParameters
- Вызов: CIBlockParameters::GetSectionSortFields
static function GetSectionSortFields($arFields = array(), $arOptions = array())
{
$arResult = array();
if (!is_array($arFields))
$arFields = array($arFields);
if (!is_array($arOptions))
$arOptions = array();
$boolLowerCase = (isset($arOptions['KEY_LOWERCASE']) && $arOptions['KEY_LOWERCASE'] == 'Y');
$arSortFields = array(
"SORT" => Loc::getMessage("IBLOCK_SORT_FIELD_SORT"),
"TIMESTAMP_X" => Loc::getMessage("IBLOCK_SORT_FIELD_TIMESTAMP"),
"NAME" => Loc::getMessage("IBLOCK_SORT_FIELD_NAME"),
"ID" => Loc::getMessage("IBLOCK_SORT_FIELD_ID"),
"DEPTH_LEVEL" => Loc::getMessage("IBLOCK_SORT_FIELD_DEPTH_LEVEL"),
);
if (!empty($arFields))
{
foreach ($arFields as $strFieldName)
{
if (isset($arSortFields[$strFieldName]))
$arResult[$strFieldName] = $arSortFields[$strFieldName];
}
unset($strFieldName);
}
else
{
$arResult = $arSortFields;
}
if ($boolLowerCase)
$arResult = array_change_key_case($arResult, CASE_LOWER);
return $arResult;
}