how do I call an action class controller in the controller?

Taking the example from here:http://www.yiiframew…ntroller#action

If I go


inside some other method then I get the error:



[font=“monospace”]If it’s put as the key in the actions() returned array, shouldn’t it kind of be attached similar to a behavior?[/font]

[font=“monospace”]EDIT: actually, it doesn’t even seem like it’s even bothering to run the actions() method. I put die(); as the first line and it never died.[/font]

[font="monospace"]This is all inside of a module.[/font]

[font=“monospace”]EDIT2: Since I’m not calling the action directly from the url, but from another method in the controller, might I have to manually call createAction first?[/font]


[font="monospace"]Seems I can go:[/font]


$edit = $this->createAction('edit');


But I can’t go

$this->edit = $edit

since the property isn’t defined.

Sooo, I think I’m going about this the entirely wrong way.


[font=“monospace”]Basically, my goal was to offset some methods that should be grouped together into another controller so this controller didn’t get so long. The method isn’t directly accessed so I suppose it shouldn’t be an action and can just be a normal method. So should I simply use a behavior?[/font]


or like you said, if it is not an action, use it as a normal method, no need to create a behavior

Very handy thx.