- Модуль: catalog
- Путь к файлу: ~/bitrix/modules/catalog/lib/config/state.php
- Класс: BitrixCatalogConfigState
- Вызов: State::getLandingSections
static function getLandingSections(): array
{
if (self::$landingSections === null)
{
self::$landingSections = [];
if (!Loader::includeModule('landing'))
{
return self::$landingSections;
}
$iterator = LandingInternalsHookDataTable::getList([
'runtime' => [
new MainORMFieldsRelationsReference(
'TMP_LANDING_SITE',
'BitrixLandingInternalsSiteTable',
['=this.ENTITY_ID' => 'ref.ID']
)
],
'select' => ['VALUE'],
'filter' => [
'=ENTITY_TYPE' => LandingHook::ENTITY_TYPE_SITE,
'=HOOK' => 'SETTINGS',
'=CODE' => 'SECTION_ID',
'=TMP_LANDING_SITE.DELETED' => 'N',
],
'cache' => ['ttl' => 86400],
]);
while ($row = $iterator->fetch())
{
$id = (int)$row['VALUE'];
if ($id <= 0)
{
continue;
}
self::$landingSections[$id] = $id;
}
unset($id, $row, $iterator);
if (!empty(self::$landingSections))
{
self::$landingSections = array_values(self::$landingSections);
}
}
return self::$landingSections;
}