framework/web/CSort.php
public function createUrl($controller,$directions)
	{
		$sorts=array();
		foreach($directions as $attribute=>$descending)
			$sorts[]=$descending ? $attribute.$this->separators[1].$this->descTag : $attribute;
		$params=$this->params===null ? $_GET : $this->params;
		$params[$this->sortVar]=implode($this->separators[0],$sorts);
		return $controller->createUrl($this->route,$params);
	}
public function createUrl($controller,$directions)
	{
		$sorts=array();
		foreach($directions as $attribute=>$descending)
			$sorts[]=$descending ? $attribute.$this->separators[1].$this->descTag : $attribute;
		$params=$this->params===null ? $_GET : $this->params;
		$params[$this->sortVar]=implode($this->separators[0],$sorts);
		return $controller->createUrl($this->route,$params);
	}
public function createUrl ( $ controller , $ directions ) { $ sorts = array ( ) ; foreach ( $ directions as $ attribute => $ descending ) $ sorts [ ] = $ descending ? $ attribute . $ this -> separators [ 1 ] . $ this -> descTag : $ attribute ; $ params = $ this -> params === null ? $ _GET : $ this -> params ; $ params [ $ this -> sortVar ] = implode ( $ this -> separators [ 0 ] , $ sorts ) ; return $ controller -> createUrl ( $ this -> route , $ params ) ; }
Creates a URL that can lead to generating sorted data.
@param CController $controller the controller that will be used to create the URL.
@param array $directions the sort directions indexed by attribute names.
The sort direction can be either CSort::SORT_ASC for ascending order or
CSort::SORT_DESC for descending order.
@return string the URL for sorting
Creates a URL that can lead to generating sorted data .