Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
fallbackaction.php
1<?php
2
3namespace Bitrix\Main\Engine;
4
5final class FallbackAction extends Action
6{
7 public const ACTION_NAME = 'fallback';
8 public const ACTION_METHOD = 'fallbackAction';
9
11 private $originalActionName;
12
14 {
15 $this->originalActionName = $name;
16 parent::__construct(self::ACTION_NAME, $controller, $config);
17 }
18
19 protected function buildBinder()
20 {
21 if ($this->binder === null)
22 {
23 $controller = $this->getController();
24 $this->binder = AutoWire\ControllerBinder::buildForMethod($controller, self::ACTION_METHOD)
25 ->setController($controller)
26 ->setSourcesParametersToMap([
27 ['actionName' => $this->originalActionName]
28 ])
29 ;
30 }
31
32 return $this;
33 }
34}
__construct($name, Controller $controller, $config=[])