build/commands/lite/protected/controllers/PostController.php
protected function generateColumnHeader($column)
	{
		$params=$_GET;
		if(isset($params['sort']) && $params['sort']===$column)
		{
			if(isset($params['desc']))
				unset($params['desc']);
			else
				$params['desc']=1;
		}
		else
		{
			$params['sort']=$column;
			unset($params['desc']);
		}
		$url=$this->createUrl('list',$params);
		return CHtml::link(Post::model()->getAttributeLabel($column),$url);
	}
protected function generateColumnHeader($column)
	{
		$params=$_GET;
		if(isset($params['sort']) && $params['sort']===$column)
		{
			if(isset($params['desc']))
				unset($params['desc']);
			else
				$params['desc']=1;
		}
		else
		{
			$params['sort']=$column;
			unset($params['desc']);
		}
		$url=$this->createUrl('list',$params);
		return CHtml::link(Post::model()->getAttributeLabel($column),$url);
	}
protected function generateColumnHeader ( $ column ) { $ params = $ _GET ; if ( isset ( $ params [ 'sort' ] ) && $ params [ 'sort' ] === $ column ) { if ( isset ( $ params [ 'desc' ] ) ) unset ( $ params [ 'desc' ] ) ; else $ params [ 'desc' ] = 1 ; } else { $ params [ 'sort' ] = $ column ; unset ( $ params [ 'desc' ] ) ; } $ url = $ this -> createUrl ( 'list' , $ params ) ; return CHtml :: link ( Post :: model ( ) -> getAttributeLabel ( $ column ) , $ url ) ; }
Generates the header cell for the specified column.
This method will generate a hyperlink for the column.
Clicking on the link will cause the data to be sorted according to the column.
@param string the column name
@return string the generated header cell content
Generates the header cell for the specified column . This method will generate a hyperlink for the column . Clicking on the link will cause the data to be sorted according to the column .