• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/marketing/event/qrmobileevent.php
  • Класс: BitrixTasksInternalsMarketingEventQrMobileEvent
  • Вызов: QrMobileEvent::saveQr
private function saveQr($qr): string
{
	$fileName = Random::getString(64).'.png';
	$arFile = array(
		'name' => $fileName,
		'content'  => $qr,
		'MODULE_ID' => 'tasks'
	);
	$fileId = CFile::SaveFile($arFile, 'tasks');

	$file = CFile::GetByID($fileId)->Fetch();

	$externalId = $file['EXTERNAL_ID'];
	$fileName = $file['FILE_NAME'];

	$imgSrc = $this->getBasePath() . '/'. self::QR_URI .'?id=' . $externalId . '_' . $fileName;

	return $imgSrc;
}