From bae5cda5b9397f99ad6e7fa23ede7baa1cf8bcbc Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 25 Dec 2013 23:36:28 -0500 Subject: [PATCH] The signature for `yii\gridview\ActionColumn::urlCreator` is changed - the `$action` parameter is moved to the first --- framework/CHANGELOG.md | 1 + framework/yii/grid/ActionColumn.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index b6c56c6..32e5fd4 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -38,6 +38,7 @@ Yii Framework 2 Change Log - Chg: Renamed `ActiveRecord::getPopulatedRelations()` to `getRelatedRecords()` (qiangxue) - Chg: Renamed `attributeName` and `className` to `targetAttribute` and `targetClass` for `UniqueValidator` and `ExistValidator` (qiangxue) - Chg: Added `yii\widgets\InputWidget::options` (qiangxue) +- Chg: The signature for `yii\gridview\ActionColumn::urlCreator` is changed - the `$action` parameter is moved to the first (qiangxue) - New #1438: [MongoDB integration](https://github.com/yiisoft/yii2-mongodb) ActiveRecord and Query (klimov-paul) - New #1393: [Codeception testing framework integration](https://github.com/yiisoft/yii2-codeception) (Ragazzo) diff --git a/framework/yii/grid/ActionColumn.php b/framework/yii/grid/ActionColumn.php index b53b606..d260bd9 100644 --- a/framework/yii/grid/ActionColumn.php +++ b/framework/yii/grid/ActionColumn.php @@ -70,16 +70,16 @@ class ActionColumn extends Column } /** + * @param string $action * @param \yii\db\ActiveRecord $model * @param mixed $key the key associated with the data model * @param integer $index - * @param string $action * @return string */ - public function createUrl($model, $key, $index, $action) + public function createUrl($action, $model, $key, $index) { if ($this->urlCreator instanceof Closure) { - return call_user_func($this->urlCreator, $model, $key, $index, $action); + return call_user_func($this->urlCreator, $action, $model, $key, $index); } else { $params = is_array($key) ? $key : ['id' => $key]; $route = $this->controller ? $this->controller . '/' . $action : $action;