dynamic Menu creation

So…

I have got one controller. There are several actions in it.

Here is controller code =




class DoController extends CController

{

public function actionIndex()

{

 $this->render('index');

}

public function actionPage()

{

 $this->render('page');

}


public function actionAbout()

{

 $this->render('about');

}


public function actionContact()

{

 $this->render('contact');

}		

}



I would like to create menu.

Are there the ways to do this dynamically?

Something like =


$this->action_list()->run()

:)

The out the box Controller in Components has an attribute that holds the menu information. You could use CController::beforeAction() to use reflection to update this attribute; which is then used in the layout.

to Say_Ten

thanks for your speedy answer!

And what if to use standard function of PHP5 --> get_class_methods()… ?

Maybe this way is simpler?