Calling Child Function in Parent Class

Hi, I am trying to figure out why this will not work. I have made some functions static, thinking it would help, but it still does not work. OK, to the code…

I have a class FActiveRecord that extends ActiveRecord so that I could put these functions in that would be inherited by all my models.

class FActiveRecord extends CActiveRecord


	public static function getOptionValue($x,$key) {




		return $thearray[$key];



	public static function getOptionKey($x,$value) {




		foreach ($thearray as $key => $avalue) {

			if ($avalue==$value) return $key;


		return "Not Found";



I then have a class Customers that extends FActiveRecord, and it has the following functions:

class Customers extends FActiveRecord


 ... a lot of code ...

public static function getPreferredOptions() {







	return $options;


There are several other functions that are the same, but just containing different arrays. These are the keys and values for input lists for fields in the model’s database table. The point of the FActiveRecord functions is to pull out a single value when I need it.

Calling the functions:

In my controller CustomersController, I create the dataprovider:

$dataProvider=new CActiveDataProvider('Customers',array('criteria'=>$criteria));



Index.php is as such:


$this->widget('zii.widgets.CListView', array(





Finally, the _view:

<?php echo Customers::getOptionValue('Customers::getStatusOptions',$data->status) .

 ' - ' . Customers::getOptionValue('Customers::getAgentOptions',$data->agent);?>


Fatal error: Call to undefined function Customers::getStatusOptions() in /home/airmuse/public_html/newtest/protected/models/FActiveRecord.php on line 15

I ran get_class on the _view file, and the class for the object instance is CBaseController.

All help is greatly appreciated.