I believe that the right way to do this is with scopes .
You can define any number of areas that organize the result set and use them like this:
Company::model()->scopeName()->findAll();
, , :
public function defaultScope() {
return array('order' => 'company ASC');
}
, Company::model()->findAll(); .