overloading createTemplate method on presenter for kdyby tranlator
Notice: This thread is very old.
- alnux
- Member | 139
Hi i want to use kdyby translator on latte templates and on his documentation says that i have to overload createTemplate()
protected function createTemplate($class = NULL)
{
$template = parent::createTemplate($class);
$template->registerHelperLoader(callback($this->translator->createTemplateHelpers(), 'loader'));
return $template;
}
but it works on 2.0.* function and im using 2.2.1 . Could you tell how and where i have to do the modification.
- Quinix
- Member | 108
You don't have to do it, as the documentation says:
If you're not hacking the Latte\Engine creation in any way, it will work right away, because the extension will register it.
- Filip Procházka
- Moderator | 4668
You had to do it for 2.1 and lower, but in 2.2 it should be registered automatically.