1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
disk.php
См. документацию.
1
<?php
2
namespace
Bitrix\Im\Controller\Call;
3
4
use Bitrix\Disk\Controller\File,
5
Bitrix\Main\Engine\Controller,
6
Bitrix\Disk\Controller\Content,
7
Bitrix\Main\Engine\ActionFilter,
8
Bitrix\Im\Controller\Call\Filter;
9
use Bitrix\Main\Engine\Action;
10
use Bitrix\Main\Loader;
11
18
class
Disk
extends
Controller
19
{
20
protected
function
getDefaultPreFilters
():
array
21
{
22
return
[
23
new
ActionFilter\HttpMethod
([
'POST'
]),
24
new
Filter\Authorization(),
25
new
Filter\DiskFolderAccessCheck(),
26
];
27
}
28
29
public
function
configureActions
():
array
30
{
31
return
[
32
'upload'
=> [
33
'-prefilters'
=> [
34
ActionFilter\Csrf::class,
35
ActionFilter\Authentication::class
36
],
37
],
38
'commit'
=> [
39
'-prefilters'
=> [
40
ActionFilter\Csrf::class,
41
ActionFilter\Authentication::class
42
],
43
],
44
];
45
}
46
47
protected
function
processBeforeAction
(
Action
$action
): bool
48
{
49
if
(!Loader::includeModule(
'disk'
))
50
{
51
return
false
;
52
}
53
54
return
parent::processBeforeAction(
$action
);
55
}
56
57
public
function
uploadAction
(
$filename
, $token =
null
)
58
{
59
$params
= [
60
'filename'
=>
$filename
,
61
'token'
=> $token,
62
];
63
$this->
setScope
(Controller::SCOPE_REST);
64
65
return
$this->
forward
(
new
Content(),
'upload'
,
$params
);
66
}
67
68
public
function
commitAction
($folderId,
$filename
,
$contentId
, $generateUniqueName =
false
)
69
{
70
$params
= [
71
'folderId'
=> $folderId,
72
'filename'
=>
$filename
,
73
'contentId'
=>
$contentId
,
74
'generateUniqueName'
=> $generateUniqueName,
75
];
76
77
$this->
setScope
(Controller::SCOPE_REST);
78
79
return
$this->
forward
(
new
File
(),
'createByContent'
,
$params
);
80
}
81
}
Bitrix\Im\Controller\Call\Disk\getDefaultPreFilters
getDefaultPreFilters()
Определения
disk.php:20
Bitrix\Im\Controller\Call\Disk\commitAction
commitAction($folderId, $filename, $contentId, $generateUniqueName=false)
Определения
disk.php:68
Bitrix\Im\Controller\Call\Disk\uploadAction
uploadAction($filename, $token=null)
Определения
disk.php:57
Bitrix\Im\Controller\Call\Disk\processBeforeAction
processBeforeAction(Action $action)
Определения
disk.php:47
Bitrix\Im\Controller\Call\Disk\configureActions
configureActions()
Определения
disk.php:29
Bitrix\Main\Engine\ActionFilter\HttpMethod
Определения
httpmethod.php:13
Bitrix\Main\Engine\Action
Определения
action.php:17
Bitrix\Main\Engine\Controller\setScope
setScope($scope)
Определения
controller.php:373
Bitrix\Main\Engine\Controller\forward
forward($controller, string $actionName, array $parameters=null)
Определения
controller.php:107
$filename
$filename
Определения
file_edit.php:47
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Im\Disk
Определения
norelationpermission.php:2
Bitrix\Main\Controller
Определения
agreement.php:2
Bitrix\Main\File
Определения
Image.php:9
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
$contentId
$contentId
Определения
sonet_set_content_view.php:27
$action
$action
Определения
file_dialog.php:21
bitrix
modules
im
lib
controller
call
disk.php
Создано системой
1.14.0