Yii Framework Forum: Calling action in a different Controller - Yii Framework Forum

Jump to content

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

Calling action in a different Controller Rate Topic: -----

#1 User is offline   Deepak Pradhan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 209
  • Joined: 01-May 09
  • Location:Charlotte, NC

Posted 11 December 2009 - 04:43 AM

Is it possible to call the action in a different Controller. I tried redirect but cannot pass the $_POST with it. Any solution?
0

#2 User is offline   Roberto 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 15-October 09

Posted 11 December 2009 - 05:29 AM

View Postfoe#1, on 11 December 2009 - 04:43 AM, said:

Is it possible to call the action in a different Controller. I tried redirect but cannot pass the $_POST with it. Any solution?


See: http://www.yiiframew...ntroller-detail
0

#3 User is offline   Roberto 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 15-October 09

Posted 11 December 2009 - 05:32 AM

On the other hand consider making a class from the action and you can add it to both controllers.
http://www.yiiframew...ntroller#action
0

#4 User is offline   Deepak Pradhan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 209
  • Joined: 01-May 09
  • Location:Charlotte, NC

Posted 11 December 2009 - 11:45 AM

View PostRoberto, on 11 December 2009 - 05:32 AM, said:

On the other hand consider making a class from the action and you can add it to both controllers.
http://www.yiiframew...ntroller#action


I ended up Extending the controller but I had to duplicate the view.

Thanks a lot, I will look into your recommendation.
0

#5 User is offline   Deepak Pradhan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 209
  • Joined: 01-May 09
  • Location:Charlotte, NC

Posted 15 December 2009 - 03:38 AM

View PostRoberto, on 11 December 2009 - 05:29 AM, said:



runController redirects the screen, it does not do what I intended for.
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