Commit 50d720ce by baodude

use toRoute instead of createUrl in ActionColumn

use toRoute() instead of createUrl() in ActionColumn
parent bcf5b464
...@@ -10,6 +10,7 @@ namespace yii\grid; ...@@ -10,6 +10,7 @@ namespace yii\grid;
use Yii; use Yii;
use Closure; use Closure;
use yii\helpers\Html; 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. * 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 ...@@ -128,7 +129,7 @@ class ActionColumn extends Column
} else { } else {
$params = is_array($key) ? $key : ['id' => (string)$key]; $params = is_array($key) ? $key : ['id' => (string)$key];
$params[0] = $this->controller ? $this->controller . '/' . $action : $action; $params[0] = $this->controller ? $this->controller . '/' . $action : $action;
return Yii::$app->controller->createUrl($params); return Url::toRoute($params);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment