• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/ProductGrid/StoreDataProvider.php
  • Класс: BitrixCrmMobileProductGridStoreDataProvider
  • Вызов: StoreDataProvider::loadStores
static function loadStores(): void
{
	self::$stores = [];

	$filter = ['=ACTIVE' => 'Y'];

	$accessFilter = AccessController::getCurrent()->getEntityFilter(
		ActionDictionary::ACTION_STORE_VIEW,
		StoreTable::class
	);
	if ($accessFilter)
	{
		$filter = [
			$accessFilter,
			$filter,
		];
	}

	$storeList = StoreTable::getList([
		'filter' => $filter,
		'select' => [
			'ID',
			'IS_DEFAULT',
		],
	]);

	while ($store = $storeList->fetch())
	{
		if ($store['IS_DEFAULT'] === 'Y')
		{
			self::$defaultStoreId = (int)$store['ID'];
		}

		self::$stores[$store['ID']] = $store;
	}
}