Yes, as long as your helper is in the app/views/helpers directory, and
not inside the cake core libs.
As to actually loading the helper (if it's not already loaded)... If
you're on 1.2 pre-alpha you would use:
loadHelper('Form');
or if you're on bleeding edge 1.2 branch:
App::import('Helper', 'Form');
You can also copy the form helper from the core libs directory to your
app helpers directory if you want to modify the file (and not extend
it). This has the advantage of not having to change all your helper
references in your views to a new helper.
Cheers,
Adam
On Dec 11, 12:37 am, avairet <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> In the "Cake Philosophy", is it correct to extend an existent Helper
> to overwrite some methods?
>
> For example to write a file like this:
>
> <?php
> require(HELPERS.'form.php');
>
> class MyHelper extends FormHelper
> {
> public function dateTime()
> {
>
> }
>
> }
>
> ?>
>
> Thanks by advance for your opinions about that!
>
> BR
>
> Avairet
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---