• Модуль: catalogmobile
  • Путь к файлу: ~/bitrix/modules/catalogmobile/lib/Controller/BarcodeScanner.php
  • Класс: BitrixCatalogMobileControllerBarcodeScanner
  • Вызов: BarcodeScanner::sendBarcodeScannedEventAction
public function sendBarcodeScannedEventAction(string $id, string $barcode): ?array
{
	if (!Loader::includeModule('pull'))
	{
		$this->addError(new Error('Pull module has not been installed'));
		return null;
	}

	Event::add($this->getCurrentUser()->getId(), [
		'module_id' => 'catalog',
		'command' => 'HandleBarcodeScanned',
		'params' => [
			'id' => $id,
			'barcode' => $barcode,
		]
	]);

	return [];
}