1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Background.php
См. документацию.
1<?php
2
4
7
8class Background extends Controller
9{
13 public function getAction()
14 {
16 $diskFolderId = $diskFolder? (int)$diskFolder->getId(): 0;
18
19 return [
20 'backgrounds' => [
23 ],
24 'upload' => [
25 'folderId' => $diskFolderId,
26 ],
28 'infoHelperParams' => $infoHelperParams,
29 ];
30 }
31
35 public function commitAction(int $fileId)
36 {
38 $this->getCurrentUser()->getId(),
39 $fileId
40 );
41
42 if (!$result)
43 {
44 $this->addError(new \Bitrix\Main\Error(
45 "Specified fileId is not located in background folder.",
46 "FILE_ID_ERROR"
47 ));
48
49 return false;
50 }
51
52 return [
53 'result' => true
54 ];
55 }
56
60 public function deleteAction(int $fileId)
61 {
63 $this->getCurrentUser()->getId(),
64 $fileId
65 );
66
67 if (!$result)
68 {
69 $this->addError(new \Bitrix\Main\Error(
70 "Specified fileId is not located in background folder.",
71 "FILE_ID_ERROR"
72 ));
73
74 return false;
75 }
76
77 return [
78 'result' => true
79 ];
80 }
81}
static getUploadFolder($userId=null)
Определения background.php:311
static get()
Определения background.php:11
static getLimitForJs()
Определения background.php:322
static getCustom()
Определения background.php:255
commitAction(int $fileId)
Определения Background.php:35
deleteAction(int $fileId)
Определения Background.php:60
Определения error.php:15
static includeModule($moduleName)
Определения loader.php:67
static getInitParams(?string $currentUrl=null)
Определения infohelper.php:22
static CommitBackgroundFile($userId, $fileId)
Определения im_disk.php:2140
static DeleteBackgroundFile($userId, $fileId)
Определения im_disk.php:2163
$result
Определения get_property_values.php:14