From 50d720ce34c3c4d2fde347fef1a7fee2498792a4 Mon Sep 17 00:00:00 2001 From: baodude <79403828@qq.com> Date: Tue, 11 Mar 2014 10:32:23 +0800 Subject: [PATCH] use toRoute instead of createUrl in ActionColumn use toRoute() instead of createUrl() in ActionColumn --- framework/grid/ActionColumn.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/grid/ActionColumn.php b/framework/grid/ActionColumn.php index cae5530f8e..5713768ad6 100644 --- a/framework/grid/ActionColumn.php +++ b/framework/grid/ActionColumn.php @@ -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); } }