public function createUrl($position, $model, $key, $index)
    {
        if (is_callable($this->urlCreator)) {
            return call_user_func($this->urlCreator, $position, $model, $key, $index);
        } else {
            $params = array_merge(
                Yii::$app->getRequest()->getQueryParams(),
                is_array($key) ? $key : ['id' => (string) $key]
            );
            $params[$this->positionParam] = $position;
            $params[0] = $this->route;

            return Url::toRoute($params);
        }
    }
public function createUrl($position, $model, $key, $index)
    {
        if (is_callable($this->urlCreator)) {
            return call_user_func($this->urlCreator, $position, $model, $key, $index);
        } else {
            $params = array_merge(
                Yii::$app->getRequest()->getQueryParams(),
                is_array($key) ? $key : ['id' => (string) $key]
            );
            $params[$this->positionParam] = $position;
            $params[0] = $this->route;

            return Url::toRoute($params);
        }
    }
public function createUrl ( $ position , $ model , $ key , $ index ) { if ( is_callable ( $ this -> urlCreator ) ) { return call_user_func ( $ this -> urlCreator , $ position , $ model , $ key , $ index ) ; } else { $ params = array_merge ( Yii :: $ app -> getRequest ( ) -> getQueryParams ( ) , is_array ( $ key ) ? $ key : [ 'id' => ( string ) $ key ] ) ; $ params [ $ this -> positionParam ] = $ position ; $ params [ 0 ] = $ this -> route ; return Url :: toRoute ( $ params ) ; } }
Creates a URL for the given position and model.
This method is called for each button and each row.
@param string $position the position name
@param \yii\db\BaseActiveRecord $model the data model
@param mixed $key the key associated with the data model
@param integer $index the current row index
@return string the created URL
Creates a URL for the given position and model . This method is called for each button and each row .