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
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
--
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
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,
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 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
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
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
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
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
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,
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
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
13 matches
Mail list logo