Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
entity.php
1
<?php
2
3
namespace
Bitrix\Catalog\Controller\AgentContract
;
4
5
use
Bitrix\Main
;
6
use
Bitrix\Catalog
;
7
8
class
Entity
extends
Main\Engine\Controller
9
{
10
protected
function
processBeforeAction
(Main\
Engine
\
Action
$action)
11
{
12
if
(!Catalog\v2\AgentContract\AccessController::check())
13
{
14
$this->
addError
(
15
new
Main\
Error
(
16
Main\Localization\
Loc::getMessage
(
'CATALOG_CONTROLLER_AGENT_CONTRACT_ENTITY_PERMISSION_DENIED'
)
17
)
18
);
19
return
false
;
20
}
21
22
return
parent::processBeforeAction($action);
23
}
24
31
public
function
deleteAction
(
int
$id): void
32
{
33
$deleteResult = Catalog\v2\AgentContract\Manager::delete($id);
34
if
(!$deleteResult->isSuccess())
35
{
36
$this->
addErrors
($deleteResult->getErrors());
37
}
38
}
39
46
public
function
deleteListAction
(array $ids): void
47
{
48
foreach
($ids as $id)
49
{
50
$deleteResult = Catalog\v2\AgentContract\Manager::delete($id);
51
if
(!$deleteResult->isSuccess())
52
{
53
$this->
addErrors
($deleteResult->getErrors());
54
}
55
}
56
}
57
}
Bitrix\Catalog\Controller\AgentContract\Entity
Definition
entity.php:9
Bitrix\Catalog\Controller\AgentContract\Entity\deleteListAction
deleteListAction(array $ids)
Definition
entity.php:46
Bitrix\Catalog\Controller\AgentContract\Entity\deleteAction
deleteAction(int $id)
Definition
entity.php:31
Bitrix\Catalog\Controller\AgentContract\Entity\processBeforeAction
processBeforeAction(Main\Engine\Action $action)
Definition
entity.php:10
Bitrix\Main\Engine\Action
Definition
action.php:17
Bitrix\Main\Engine\Controller
Definition
controller.php:32
Bitrix\Main\Engine\Controller\addError
addError(Error $error)
Definition
controller.php:1051
Bitrix\Main\Engine\Controller\addErrors
addErrors(array $errors)
Definition
controller.php:1064
Bitrix\Main\Error
Definition
error.php:14
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Rest\OAuth\Engine
Definition
engine.php:16
Bitrix\Catalog\Controller\AgentContract
Definition
entity.php:3
Bitrix\Catalog
Bitrix\Main
modules
catalog
lib
controller
agentcontract
entity.php
Создано системой
1.10.0