• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/Access/Model/StoreDocumentElement.php
  • Класс: BitrixCatalogAccessModelStoreDocumentElement
  • Вызов: StoreDocumentElement::getStoresById
static function getStoresById(int $id): array
{
	$storeIds = [];

	if ($id > 0)
	{
		$row = StoreDocumentElementTable::getRow([
			'select' => [
				'STORE_TO',
				'STORE_FROM',
			],
			'filter' => [
				'=ID' => $id,
			],
		]);
		if ($row)
		{
			if (isset($row['STORE_TO']))
			{
				$storeIds[] = $row['STORE_TO'];
			}

			if (isset($row['STORE_FROM']))
			{
				$storeIds[] = $row['STORE_FROM'];
			}
		}
	}

	return $storeIds;
}