You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
360 B
21 lines
360 B
5 years ago
|
<?php
|
||
|
|
||
|
namespace app\utils;
|
||
|
|
||
|
use yii\base\InlineAction;
|
||
|
|
||
|
class RedirectAction
|
||
|
{
|
||
|
protected $actionId;
|
||
|
|
||
|
public function __construct($actionId)
|
||
|
{
|
||
|
$this->actionId = $actionId;
|
||
|
}
|
||
|
|
||
|
public function __invoke($id, \yii\base\Controller $controller)
|
||
|
{
|
||
|
return $controller->createAction($this->actionId);
|
||
|
}
|
||
|
}
|