1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
Application.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Controller\Marketplace
;
4
5
use
Bitrix\Main\Engine\Action
;
6
use
Bitrix\Main\Error
;
7
use
Bitrix\Main\Engine\Controller
;
8
use
Bitrix\Main\Loader
;
9
10
class
Application
extends
Controller
11
{
12
protected
function
processBeforeAction
(
Action
$action
): bool
13
{
14
if
(!Loader::includeModule(
'rest'
))
15
{
16
$this->addError(
new
Error
(
'Module Rest is not installed.'
));
17
18
return
false
;
19
}
20
21
return
true
;
22
}
23
27
public
function
listAction
(?\CRestServer $server =
null
): ?
array
28
{
29
if
($server && $server->getAuthType() !== \
Bitrix
\
Rest
\SessionAuth\Auth::AUTH_TYPE && !$this->isDebugEnabled())
30
{
31
$this->addError(
new
\
Bitrix
\
Main
\
Error
(
32
"Access access to test method available only for session authorization."
,
33
"WRONG_AUTH_TYPE"
34
));
35
36
return
null
;
37
}
38
return
(
new
\
Bitrix
\
Im
\
V2
\
Marketplace
\
Application
())->toRestFormat();
39
}
40
44
public
function
updateAction
(
int
$id,
array
$params
, ?\CRestServer $server =
null
): ?bool
45
{
46
if
($server && $server->getAuthType() !== \
Bitrix
\
Rest
\SessionAuth\Auth::AUTH_TYPE && !$this->isDebugEnabled())
47
{
48
$this->addError(
new
\
Bitrix
\
Main
\
Error
(
49
"Access access to test method available only for session authorization."
,
50
"WRONG_AUTH_TYPE"
51
));
52
53
return
null
;
54
}
55
56
$params
= array_change_key_case(
$params
, CASE_UPPER);
57
58
if
(isset(
$params
[
'ORDER'
]))
59
{
60
$application
= new \Bitrix\Im\V2\Marketplace\Application();
61
$result
=
$application
->setOrder($id, (
int
)
$params
[
'ORDER'
]);
62
$this->addErrors(
$result
->getErrors());
63
}
64
65
return
true
;
66
}
67
68
private
function
isDebugEnabled(): bool
69
{
70
$settings
=
\Bitrix\Main\Config\Configuration::getValue
(
'im'
);
71
72
return
$settings
[
'rest_debug'
] ===
true
;
73
}
74
}
Bitrix\Im\V2\Controller\Marketplace\Application
Определения
Application.php:11
Bitrix\Im\V2\Controller\Marketplace\Application\updateAction
updateAction(int $id, array $params, ?\CRestServer $server=null)
Определения
Application.php:44
Bitrix\Im\V2\Controller\Marketplace\Application\processBeforeAction
processBeforeAction(Action $action)
Определения
Application.php:12
Bitrix\Im\V2\Controller\Marketplace\Application\listAction
listAction(?\CRestServer $server=null)
Определения
Application.php:27
Bitrix\Main\Config\Configuration\getValue
static getValue($name)
Определения
configuration.php:24
Bitrix\Main\Engine\Action
Определения
action.php:17
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\Loader
Определения
loader.php:13
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$application
$application
Определения
bitrix.php:23
Bitrix\Im\V2\Controller\Marketplace
Определения
Application.php:3
Bitrix\Im\V2
Определения
ActionUuid.php:3
Bitrix\Im
Bitrix\Main\Controller
Определения
agreement.php:2
Bitrix\Main\Rest
Определения
handlers.php:8
Bitrix\Main
Bitrix
$settings
$settings
Определения
product_settings.php:43
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
$action
$action
Определения
file_dialog.php:21
bitrix
modules
im
lib
V2
Controller
Marketplace
Application.php
Создано системой
1.14.0