How to get url with aprameters in Yii

I'm using Yii's TbExtendedGridView with filtering option. Once i enter something into filter and submit i would like to create PDF out of result data.

I careated "create pdf" button which goes to controler that will create PDF. What i need to do is append all filter data to link of that button so PDF controler can get all filtered data again from database and create PDF out of it.

Question is, how do i get whole url with all parameters so i can modify it little bit and put it as "create pdf" button link.

I tryed: Yii::app()->request->getQueryString() but it returns "r=site/index" and no params after index.

Do i have to get GET data myself, explode it and append to link or is there app()->request function that will return whole thing to me?


Try this for creating url

Yii::app()->createUrl('controllerName/actionName', array(

And then you can have your action in controller as

 public function actionActionName($param1,$param2,$param3)
               echo $param1;
               echo $param2;
               echo $param2;

Need Your Help

UITableViewController with a separate data source object

ios datasource tableview

I have a separate object for the data source of a UITableViewController. I want to modify the data source dynamically but I don't want to have a direct reference of the tableView object inside the ...

How to set encoding in RESTeasy to UTF-8?

tomcat servlets jax-rs resteasy

I have a problem with encoding strings in RESTeasy. The problem is that chinese alphabet or any other non-latin characters are not displayed properly. If I try to print them out (or send as respons...