• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/iblocksection.php
  • Класс: CAllIBlockSection
  • Вызов: CAllIBlockSection::getSectionCode
static function getSectionCode($sectionId): string
{
	global $DB;

	$sectionId = (int)$sectionId;
	if (!isset(self::$arSectionCodeCache[$sectionId]))
	{
		self::$arSectionCodeCache[$sectionId] = '';
		$res = $DB->Query("SELECT IBLOCK_ID, CODE FROM b_iblock_section WHERE ID = ".$sectionId);
		$a = $res->Fetch();
		unset($res);
		if ($a)
		{
			self::$arSectionCodeCache[$sectionId] = rawurlencode($a['CODE']);
		}
	}

	return self::$arSectionCodeCache[$sectionId];
}