Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
inlineaction.php
1
<?php
2
3
namespace
Bitrix\Main\Engine\Component
;
4
5
6
use
Bitrix\Main\Engine\Action
;
7
use
Bitrix\Main\Engine\AutoWire
;
8
use
Bitrix\Main\Engine\Contract\Controllerable
;
9
use
Bitrix\Main\Engine\Controller
;
10
use
Bitrix\Main\Errorable
;
11
12
final
class
InlineAction
extends
Action
13
{
17
protected
$methodName
;
21
private
$controllerable;
22
31
public
function
__construct
(
$name
,
Controllerable
$controllerable,
Controller
$controller
,
$config
= array())
32
{
33
$this->methodName =
$controller
->generateActionMethodName(
$name
);
34
$this->controllerable = $controllerable;
35
parent::__construct(
$name
,
$controller
,
$config
);
36
}
37
38
protected
function
buildBinder
()
39
{
40
if
($this->binder ===
null
)
41
{
42
$controller
= $this->
getController
();
43
$this->binder = AutoWire\ControllerBinder::buildForMethod($this->controllerable, $this->methodName)
44
->setController(
$controller
)
45
->setSourcesParametersToMap(
$controller
->getSourceParametersList())
46
->setAutoWiredParameters(
47
array_filter(array_merge(
48
[
$controller
->getPrimaryAutoWiredParameter()],
49
$controller
->getAutoWiredParameters()
50
))
51
)
52
;
53
}
54
55
return
$this;
56
}
57
58
public
function
runWithSourceParametersList
()
59
{
60
$result = parent::runWithSourceParametersList();
61
62
if
($this->controllerable instanceof
Errorable
)
63
{
64
$this->errorCollection->add(
65
$this->controllerable->getErrors()
66
);
67
}
68
69
return
$result;
70
}
71
}
Bitrix\Main\Engine\Action
Definition
action.php:17
Bitrix\Main\Engine\Action\$controller
$controller
Definition
action.php:23
Bitrix\Main\Engine\Action\$config
$config
Definition
action.php:25
Bitrix\Main\Engine\Action\getController
getController()
Definition
action.php:138
Bitrix\Main\Engine\Action\$name
$name
Definition
action.php:27
Bitrix\Main\Engine\Component\InlineAction
Definition
inlineaction.php:13
Bitrix\Main\Engine\Component\InlineAction\buildBinder
buildBinder()
Definition
inlineaction.php:38
Bitrix\Main\Engine\Component\InlineAction\__construct
__construct($name, Controllerable $controllerable, Controller $controller, $config=array())
Definition
inlineaction.php:31
Bitrix\Main\Engine\Component\InlineAction\$methodName
$methodName
Definition
inlineaction.php:17
Bitrix\Main\Engine\Component\InlineAction\runWithSourceParametersList
runWithSourceParametersList()
Definition
inlineaction.php:58
Bitrix\Main\Engine\Controller
Definition
controller.php:32
Bitrix\Main\Engine\Contract\Controllerable
Definition
controllerable.php:6
Bitrix\Main\Errorable
Definition
errorable.php:6
Bitrix\Main\Engine\AutoWire
Definition
binder.php:3
Bitrix\Main\Engine\Component
Definition
componentcontroller.php:3
Bitrix\Sender\Internals\QueryController
Definition
action.php:8
modules
main
lib
engine
component
inlineaction.php
Создано системой
1.10.0