123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace yii\base;
- use Yii;
- class InlineAction extends Action
- {
-
- public $actionMethod;
-
- public function __construct($id, $controller, $actionMethod, $config = [])
- {
- $this->actionMethod = $actionMethod;
- parent::__construct($id, $controller, $config);
- }
-
- public function runWithParams($params)
- {
- $args = $this->controller->bindActionParams($this, $params);
- Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
- if (Yii::$app->requestedParams === null) {
- Yii::$app->requestedParams = $args;
- }
- return call_user_func_array([$this->controller, $this->actionMethod], $args);
- }
- }
|