• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/file.php
  • Класс: BitrixDiskFile
  • Вызов: File::jsonSerialize
public function jsonSerialize(): array
{
	$urlShowObjectInGrid = Driver::getInstance()->getUrlManager()->getUrlFocusController('showObjectInGrid', [
		'objectId' => $this->getId(),
	]);
	$urlShowObjectInGrid = new MainWebUri($urlShowObjectInGrid);

	return array_merge(parent::jsonSerialize(), [
		'typeFile' => (int)$this->getTypeFile(),
		'globalContentVersion' => (int)$this->getGlobalContentVersion(),
		'fileId' => (int)$this->getFileId(),
		'size' => (int)$this->getSize(),
		'etag' => $this->getEtag(),
		'links' => [
			/** @see BitrixDiskControllerFile::downloadAction() */
			'download' => MainEngineUrlManager::getInstance()->create('disk.file.download', ['fileId' => $this->getId()]),
			'showInGrid' => $urlShowObjectInGrid,
		],
	]);
}