Hi, previously I’ve been making dynamic actions by (what I assume) is a bit of cheating. Let’s say I want to have an Event controller with an action for each US state. Url would be /event/NY
So in the past I have done this:
public function missingAction($actionID)
{
if (isset($this->states[$actionID]))
{
// state action here
}
else
{
parent::missingAction($actionID);
}
}
This works fine most of the time, but now I find this breaks the createUrl for all the widgets and such as the action is NULL. I know I can override the createUrl(), but I want to know how to do this the proper Yii way by creating actions.
So, what is the proper way to create an array ("AL" to "WY") and send all of those to an action? I tried search around but it was hard to find info on it. Also, what does createActionFromMap() do?