Yii Framework Forum: Slight docs error - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Slight docs error Rate Topic: -----

#1 User is offline   KJedi 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 381
  • Joined: 19-October 08
  • Location:Nikolaev, Ukraine (Europe)

Posted 20 October 2008 - 01:46 PM

Here http://www.yiiframew...sics.controller
there is an example:

Quote

To define a new action class, do the following:



class EditAction extends CAction

{

    public function run()

    {

        // place the action logic here

    }

}



In order for the controller to be aware of this action, we override the actions() method of our controller class:



class PostController extends CController

{

    public function actions()

    {

        return array(

            'edit'=>'application.controllers.post.UpdateAction',

        );

    }

}



In the above, we use path alias 'application.controllers.post.UpdateAction to specify that the action class file is protected/controllers/post/UpdateAction.php.


But initially you crerated EditAction, not UpdateAction.

I think, that's just a mistake, yeah? It messed me up a bit, please correct this.
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,875
  • Joined: 04-October 08
  • Location:DC, USA

Posted 20 October 2008 - 03:02 PM

Thanks! Fixed.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users