Hello,
I am reading all the docs and am failing to understand this section: http://www.yiiframework.com/doc/guide/1.1/en/basics.controller#action
Can some one give a real world example as to why you would override the action?? i am having trouble wrapping my head around why you would do:
class PostController extends CController
{
public function actions()
{
return array(
'edit'=>'application.controllers.post.UpdateAction',
);
}
}
instead of
class PostController extends CController
{
public function actionUpdate()
{
//update logic here
}
}
Anyway I am sure this is a total newb question, but a real world example/usage case would help me understand it…
Thanks!