What Does "search" Mean In The Admin Action Of A Controller?

public function actionAdmin()

{


	[color="#FF0000"]$model=new Employee('search');[/color]


	$model->unsetAttributes();  // clear any default values


	if(isset($_GET['Employee']))


		$model->attributes=$_GET['Employee'];





	$this->render('admin',array(


		'model'=>$model,


	));


}

why does the ‘search’ is passed as the parameter while creating a new instance of the model? Referring the above code.

It defines the scenario that you’re using, so the model rules relating to ‘on’=>‘search’ will be used when performing the search. This allows you to specify which attributes can be searched in a search request.