On Jul 27, 2006, at 9:04 AM, jwcunha wrote:
> Dear,
>
> look at this code at my controller:
>
> echo $this->data['Alert']['dtCriacao'] = $ime->niceShort(time());
>
> But nothing id did :(
First, it needs to be $time rather than $ime, and secondly, helpers
are only available in your views (not in controllers). You'll also
want to make sure to add the TimeHelper to your controller's $helpers
array to make sure it is available in your views.
var $helpers = ('html', 'time');
Once that's done, you should be able to do:
$time->niceShort(time());
in your views for that controller.
-- John
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---