You can extend the class CHtmland add your own functions. The code should look something like this:
class MyHtml extends CHtml {
public static function myFunction() {
return 'yeah!';
}
}
Then you can use MyHtml::myFunction()as well as use all the standard CHtml functions.
Yii: Yii