- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/lib/grid/entity/iblocksettings.php
- Класс: BitrixIblockGridEntityIblockSettings
- Вызов: IblockSettings::init
protected function init(): void
{
$this->iblockFields = IblockTable::getRow([
'select' => [
'*',
'TYPE_SECTIONS' => 'TYPE.SECTIONS',
],
'filter' => [
'=ID' => $this->iblockId,
'=ACTIVE' => 'Y',
],
]);
if (empty($this->iblockFields))
{
throw new SystemException('Not found active iblock');
}
$this->iblockTypeId = $this->iblockFields['IBLOCK_TYPE_ID'];
$this->isAllowedIblockSections = $this->iblockFields['TYPE_SECTIONS'] === 'Y';
if (
$this->iblockFields['LIST_MODE'] === IblockTable::LIST_MODE_SEPARATE
|| $this->iblockFields['LIST_MODE'] === IblockTable::LIST_MODE_COMBINED
)
{
$this->listMode = $this->iblockFields['LIST_MODE'];
}
else
{
$this->listMode =
Option::get('iblock', 'combined_list_mode') === 'Y'
? IblockTable::LIST_MODE_COMBINED
: IblockTable::LIST_MODE_SEPARATE
;
}
}