mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-13 22:06:51 +08:00
Merge pull request #2696 from baodude/master
use toRoute instead of createUrl in ActionColumn
This commit is contained in:
@ -10,6 +10,7 @@ namespace yii\grid;
|
||||
use Yii;
|
||||
use Closure;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
|
||||
/**
|
||||
* ActionColumn is a column for the [[GridView]] widget that displays buttons for viewing and manipulating the items.
|
||||
@ -128,7 +129,7 @@ class ActionColumn extends Column
|
||||
} else {
|
||||
$params = is_array($key) ? $key : ['id' => (string)$key];
|
||||
$params[0] = $this->controller ? $this->controller . '/' . $action : $action;
|
||||
return Yii::$app->controller->createUrl($params);
|
||||
return Url::toRoute($params);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user