Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
UrlManager.php
1
<?php
2
3
namespace
Bitrix\UI\FileUploader
;
4
5
use
Bitrix\Main\Web\Json
;
6
use
Bitrix\Main\Web\Uri
;
7
8
class
UrlManager
9
{
10
public
static
function
getDownloadUrl
(
UploaderController
$controller,
FileInfo
$fileInfo):
Uri
11
{
12
$uri = self::getActionUrl($controller,
'download'
);
13
$uri->addParams([
'fileId'
=> $fileInfo->
getId
()]);
14
15
return
$uri;
16
}
17
18
public
static
function
getPreviewUrl
(
UploaderController
$controller,
FileInfo
$fileInfo):
Uri
19
{
20
$uri = self::getActionUrl($controller,
'preview'
);
21
$uri->addParams([
'fileId'
=> $fileInfo->
getId
()]);
22
23
return
$uri;
24
}
25
26
private
static
function
getActionUrl(
UploaderController
$controller,
string
$actionName):
Uri
27
{
28
return \Bitrix\Main\Engine\UrlManager::getInstance()->create(
29
"ui.fileuploader.{$actionName}"
,
30
[
31
'controller'
=> $controller->
getName
(),
32
'controllerOptions'
=> Json::encode($controller->
getOptions
()),
33
]
34
);
35
}
36
}
Bitrix\Main\Web\Json
Definition
json.php:11
Bitrix\Main\Web\Uri
Definition
uri.php:17
Bitrix\UI\FileUploader\FileInfo
Definition
FileInfo.php:8
Bitrix\UI\FileUploader\FileInfo\getId
getId()
Definition
FileInfo.php:74
Bitrix\UI\FileUploader\UploaderController
Definition
UploaderController.php:6
Bitrix\UI\FileUploader\UploaderController\getOptions
getOptions()
Definition
UploaderController.php:53
Bitrix\UI\FileUploader\UploaderController\getName
getName()
Definition
UploaderController.php:63
Bitrix\UI\FileUploader\UrlManager
Definition
UrlManager.php:9
Bitrix\UI\FileUploader\UrlManager\getDownloadUrl
static getDownloadUrl(UploaderController $controller, FileInfo $fileInfo)
Definition
UrlManager.php:10
Bitrix\UI\FileUploader\UrlManager\getPreviewUrl
static getPreviewUrl(UploaderController $controller, FileInfo $fileInfo)
Definition
UrlManager.php:18
Bitrix\UI\FileUploader
Definition
CanUploadResult.php:3
modules
ui
lib
FileUploader
UrlManager.php
Создано системой
1.10.0