Yii Framework Forum: Need A Function As Method And As Action - Yii Framework Forum

Jump to content

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

Need A Function As Method And As Action Rate Topic: -----

#1 User is offline   luisp88 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 19-February 13
  • Location:Caracas - Venezuela

Posted 08 March 2013 - 05:19 PM

Hello everyone, I will try to explain myself the best I can

I have a print method that takes a model and output a PDF document.
I need to tall it when I create an item (from a create controller) and then go to the actionView of that item.

Also, in the view of the item, I need a print icon that call the function or method. I undertand that methods canot be called from a link. Instead, I need to call an action and execute the PDF output task, but if I put the print as an action, then I dont know how to call it when I create an item and innmediatelly, go to view action of that item.

Hope you understand my case.

Good bye!

PS: I also tried calling actionPrint and passing the ID of the item, loading again the model and outputting the PDF and then call the actionView of that item, but it doesnt work, I think I cant call an action and then again an action as they were methods
0

#2 User is offline   macinville 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 268
  • Joined: 25-October 10
  • Location:Marikina City, Philippines

Posted 08 March 2013 - 10:34 PM

I think what you need is a cascading actions, but of course I might be wrong. Kindly clarify your concern, you told us what you need, but I think it would help if you can ask us an exact question that we can answer exactly :)
Tell your tail.
Don't be shy to upvote a post if it was able to help you
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