nkhanna24 Posted January 28, 2013 Share Posted January 28, 2013 Hi I am new in yii framework. I came across this code. $criteria=new CDbCriteria();if(isset($_GET['tag']))$criteria->addSearchCondition('question.tags',$_GET['tag']);$param = Yii::app()->request->getParam('param');$dataProvider=new CActiveDataProvider(Question::model()->recent()->with('user')->with('answers'));$this->render('index',array('dataProvider'=>$dataProvider,'param'=>$param,'tags'=>$tags,'usertype'=>$usertype));can anyone explain what getparam('param') and $this->render() do? and where this 'param' variable coming from ?thanks in advance... Link to comment Share on other sites More sharing options...
Larry Posted January 28, 2013 Share Posted January 28, 2013 getParam() retrieves the value of a variable passed to the page (e.g., in the URL). $this->render() is how output is rendered using view files. That's one of the most basic and important things to understand when using Yii. Link to comment Share on other sites More sharing options...
Recommended Posts