Sometime ago, I developed my own helpers for formatting date. Everything
is ok, but now I need those function even in the controller level. So I
thought about components. Everything is still fine. Now I wouldn't like
to duplicate the code, I would like something like using the components
code from
You could make your methods static and access them with ClassName::yourMethod
aswell as $className-yourMethod
/Christian
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of davide
Sent: 20. oktober 2006 11:49
To: Cake PHP ML
Subject: Helpers
You forgot to call view in the helper :
class MyHelper...
function dumb(param1, param2){
return $this-view-controller-MyComponent-dumb(param1,
param2);
}
...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
leo.cacheux wrote:
You forgot to call view in the helper :
class MyHelper...
function dumb(param1, param2){
return $this-view-controller-MyComponent-dumb(param1,
param2);
}
Cool, it works!
Now the question is: is this the better way to implement the feature?
Otherwise, what
Ok thanks,
I did that, now my Component gets my menu links array, and in the View
my presentation Helper loops through the array and builds up a string
of menu links which I then print out at the end of the Helper Method.
Which makes a lot more sense, glad I got that sorted out early on...
I