Re: how to call one function of one contoller into another controller

2012-08-14 Thread sooryender
On Tuesday, July 17, 2012 11:57:16 AM UTC+5:30, sneha kulkarni wrote: how i can call one function of one controller into another controller.plz help -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: how to call one function of one contoller into another controller

2012-08-14 Thread soda sonic
you read topiccomponent. from cookbook i try example for you ? 14 ?.?. 2012 19:49, sooryender sooryen...@gmail.com : On Tuesday, July 17, 2012 11:57:16 AM UTC+5:30, sneha kulkarni wrote: how i can call one function of one controller into another controller.plz help --

Re: how to call one function of one contoller into another controller

2012-08-14 Thread soda sonic
http://book.cakephp.org/1.3/view/996/Creating-Components 2012/8/14 soda sonic sodag...@gmail.com you read topiccomponent. from cookbook i try example for you ? 14 ?.?. 2012 19:49, sooryender sooryen...@gmail.com : On Tuesday, July 17, 2012 11:57:16 AM UTC+5:30, sneha

Re: how to call one function of one contoller into another controller

2012-08-14 Thread Chetan Varshney
You should put common functions in app controller or in component. Calling a controller function in other controller is not good practice. However you can import target controller in controller. App::import(Controller, Target); $target = new TargetController; $target-anyFunction(); On Tue,

Re: how to call one function of one contoller into another controller

2012-08-14 Thread Yasir Arafat Hasib
Hello, I think the following url will help you. http://arafats.info/how-to-call-function-of-a-controller-from-another-controller-in-cakephp/ On Tue, Aug 14, 2012 at 8:57 PM, Chetan Varshney chetanvarsh...@gmail.comwrote: You should put common functions in app controller or in component.

how to call one function of one contoller into another controller

2012-07-17 Thread sneha kulkarni
how i can call one function of one controller into another controller.plz help -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To

Re: how to call one function of one contoller into another controller

2012-07-17 Thread Dr. Tarique Sani
While you can do what Chetan says - you should not be required to that... Consider creating a component if several of your component share the same code OR slight less worse than above create a method in app controller HTH Tarique On Tue, Jul 17, 2012 at 12:16 PM, Chetan Patel

Re: how to call one function of one contoller into another controller

2012-07-17 Thread euromark
exactly in short: you don't most cases you got your coding wrong. try to put your code into the model, a component, a lib or some other more generic class where you can access and call it from all controller methods you need it. but including other controllers will only result in a mess in the

Re: how to call one function of one contoller into another controller

2012-07-17 Thread Bharat Maheshwari
Not a big issue you can simply use requestaction just like in a cpt file Suppose you have a function in *user controller* named : - * getUserDetail($user_id)* and now you want to use this function in post controller then simply write

Re: how to call one function of one contoller into another controller

2012-07-17 Thread AD7six
On Tuesday, 17 July 2012 12:59:59 UTC+2, Bharat Maheshwari wrote: Not a big issue you can simply use requestaction just like in a cpt file Suppose you have a function in *user controller* named : - * getUserDetail($user_id)* and now you want to use this function in post controller then

Re: how to call one function of one contoller into another controller

2012-07-17 Thread Bharat Maheshwari
I just know how to solve problem easily doesn't matter how If you really worried about the logic then put a great code here and i assure i will also use your code So please guide me also. On Tuesday, July 17, 2012 4:54:54 PM UTC+5:30, AD7six wrote: On Tuesday, 17 July 2012 12:59:59 UTC+2,

Re: how to call one function of one contoller into another controller

2012-07-17 Thread AD7six
On Tuesday, 17 July 2012 13:36:24 UTC+2, Bharat Maheshwari wrote: I just know how to solve problem easily doesn't matter how If you really worried about the logic then put a great code here and i assure i will also use your code So please guide me also. now-3 people have already done

Re: how to call one function of one contoller into another controller

2012-07-17 Thread Борислав Събев
requestActoin() is meant to be used in views but as said it will initialize a whole request which is not as slow as CakePHP 1.3 but nevertheless shared controller logic should be packaged in some way. :) This could be done with a Component or in AppController. For example if you have a function