Здравствуйте, если кто знает подскажите, как получить $arParams в экшен ?
При обращении к testAction возвращает пустой массив ...
Код:
При обращении к testAction возвращает пустой массив ...
Код:
| Код |
|---|
class TestAjax extends CBitrixComponent implements Controllerable
{
public function configureActions()
{
return [
'test' => [
'prefilters' => [
new ActionFilter\Authentication(),
new ActionFilter\HttpMethod(
[ActionFilter\HttpMethod::METHOD_GET, ActionFilter\HttpMethod::METHOD_POST]
),
new ActionFilter\Csrf(),
],
'postfilters' => []
]
];
}
public function onPrepareComponentParams($arParams)
{
return $arParams;
}
public function testAction()
{
return $this->arParams;
}
function executeComponent()
{
$this->includeComponentTemplate();
}
} |