• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/comp_parameters.php
  • Класс: CIBlockParameters
  • Вызов: CIBlockParameters::getCatalogStores
static function getCatalogStores()
{
	if (!isset(self::$catalogStoreCache))
	{
		self::$catalogStoreCache = array();
		if (self::$catalogIncluded === null)
			self::$catalogIncluded = Loader::includeModule('catalog');
		if (self::$catalogIncluded)
		{
			$storeCount = 0;
			$maxStores = (int)MainConfigOption::get('iblock', 'seo_max_stores');
			$getListParams = array(
				'select' => array('ID', 'TITLE', 'ADDRESS', 'SORT'),
				'order' => array('SORT' => 'ASC')
			);
			if ($maxStores > 0)
				$getListParams['limit'] = $maxStores;
			$storeIterator = CatalogStoreTable::getList($getListParams);
			while ($store = $storeIterator->fetch())
			{
				self::$catalogStoreCache[$storeCount] = $store;
				$storeCount++;
			}
		}
	}
	return self::$catalogStoreCache;
}