- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/classes/general/iblocksection.php
- Класс: CAllIBlockSection
- Вызов: CAllIBlockSection::isExistsMnemonicCode
public function isExistsMnemonicCode(string $code, ?int $sectionId, int $iblockId): bool
{
if ($code === '')
{
return false;
}
$filter = [
'=IBLOCK_ID' => $iblockId,
'=CODE' => $code,
];
if ($sectionId !== null)
{
$filter['!=ID'] = $sectionId;
}
$row = IblockSectionTable::getList([
'select' => ['ID'],
'filter' => $filter,
'limit' => 1,
])->fetch();
return !empty($row);
}