• Модуль: catalogmobile
  • Путь к файлу: ~/bitrix/modules/catalogmobile/lib/ProductWizard/ConfigQuery.php
  • Класс: BitrixCatalogMobileProductWizardConfigQuery
  • Вызов: ConfigQuery::getStoresList
private function getStoresList(): array
{
	$allowedStores = $this->accessController->getPermissionValue(ActionDictionary::ACTION_STORE_VIEW);
	if (!$allowedStores)
	{
		return [];
	}

	$result = [];

	$filter = [
		'ACTIVE' => 'Y',
	];
	if (!in_array(PermissionDictionary::VALUE_VARIATION_ALL, $allowedStores, true))
	{
		$filter['=ID'] = $allowedStores;
	}

	$stores = CCatalogStore::GetList(
		[
			'SORT' => 'ASC',
		],
		$filter,
		false,
		['nTopCount' => self::MAX_DICTIONARY_ITEMS],
		['ID', 'TITLE', 'ADDRESS','IS_DEFAULT',]
	);
	while ($store = $stores->Fetch())
	{
		$result[] = [
			'id' => $store['ID'],
			'title' => $store['TITLE'] == '' ? $store['ADDRESS'] : $store['TITLE'],
			'type' => 'store',
			'isDefault' => $store['IS_DEFAULT'] === 'Y',
		];
	}

	return $result;
}