Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
mode.php
1
<?php
2
3
namespace
Bitrix\Catalog\Controller\Document
;
4
5
use
Bitrix\Catalog
;
6
use
Bitrix\Catalog\Access\AccessController
;
7
use
Bitrix\Catalog\Controller\Controller
;
8
use
Bitrix\Main\Engine
;
9
use
Bitrix\Main\Engine\ActionFilter
;
10
11
class
Mode
extends
Engine\Controller
12
{
16
public
function
statusAction
(): ?string
17
{
18
if
(
19
AccessController::getCurrent()->check(Controller::CATALOG_STORE)
20
|| AccessController::getCurrent()->check(Controller::CATALOG_READ)
21
)
22
{
23
return
Catalog\Config\State::isUsedInventoryManagement() ?
'Y'
:
'N'
;
24
}
25
26
$this->
addError
(
new
\
Bitrix
\Main\
Error
(
'Access denied'
));
27
28
return
null
;
29
}
30
31
protected
function
getDefaultPreFilters
()
32
{
33
return
array_merge(
34
parent::getDefaultPreFilters(),
35
[
36
new
ActionFilter\
Scope
(ActionFilter\
Scope::REST
),
37
]
38
);
39
}
40
}
Bitrix\Catalog\Access\AccessController
Definition
AccessController.php:28
Bitrix\Catalog\Controller\Controller
Definition
controller.php:19
Bitrix\Catalog\Controller\Document\Mode
Definition
mode.php:12
Bitrix\Catalog\Controller\Document\Mode\getDefaultPreFilters
getDefaultPreFilters()
Definition
mode.php:31
Bitrix\Catalog\Controller\Document\Mode\statusAction
statusAction()
Definition
mode.php:16
Bitrix\Main\Engine\ActionFilter\Scope
Definition
scope.php:12
Bitrix\Main\Engine\ActionFilter\Scope\REST
const REST
Definition
scope.php:14
Bitrix\Main\Engine\Controller
Definition
controller.php:32
Bitrix\Main\Engine\Controller\addError
addError(Error $error)
Definition
controller.php:1051
Bitrix\Main\Error
Definition
error.php:14
Bitrix\Catalog\Controller\Document
Definition
element.php:3
Bitrix\Catalog
Bitrix\Main\Engine\ActionFilter
Definition
authentication.php:4
Bitrix\Main\Engine
Definition
action.php:3
Bitrix
modules
catalog
lib
controller
document
mode.php
Создано системой
1.10.0