modify core classes = suicide :) i'll try something else :)
On 11 Mag, 14:30, John Andersen <[email protected]> wrote: > If you are willing, you could just change the formHelper method > yourself! > Replace the standard date format with a predefined constant. Thus > should you later wish to change the format, you just change the > constant only! > Later you could suggest the CakePHP team to introduce the change into > their code. > Enjoy, > John > > On May 11, 2:56 pm, Ernesto <[email protected]> wrote: > > > > > @ John > > > $dateFormat = "DMY" was just an example :) > > > @ Miles > > > your solution works properly but that's helper "cloning", not > > "extending"... the new helper wouldn't inherit any of parent's > > function... i need to re-code them all. > > i'm also thinking about future code changes/improvements by cake team. > > i'll need to re-code the function in order to reflect the mods. > > that's useless work!! > > > i wish cake has helper extension capabilities... > > > PS: sry for my ultra-bad-and-incorrect-english :P > > > On 11 Mag, 12:29, John Andersen <[email protected]> wrote: > > > > Funny that your example of wanting to force dateTime function to use > > > 'DMY' format as default for the dateFormat, as that is what is defined > > > as the default format in the class :) ... but I understand it! The > > > default format is hardcoded in the method definition, thus can't be > > > changed without overloading the method. > > > > Well, I suggest you try Miles J's option, extending the formHelper. > > > Enjoy, > > > John > > > > On May 11, 12:59 pm, Ernesto <[email protected]> wrote:> @ John > > > Andersen: > > > > > for ex. force "DMY" as dateFormat in dateTime function > > > > > @ Miles J > > > > > cloning core helpers doesn't sounds very good to me... > > > > [snip] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
