Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * create template
- *
- * @param string $class|NULL
- */
- protected function createTemplate($class = NULL)
- {
- // inicializace
- $texy = new Texy();
- $texy->encoding = 'utf-8';
- $texy->allowedTags = Texy::ALL;
- $texy->allowedStyles = Texy::ALL;
- $texy->setOutputMode(Texy::HTML5);
- // registrace filtru
- $template = parent::createTemplate($class);
- $template->registerHelper('texy', callback($texy, 'process'));
- $template->registerHelper('timeAgoInWords', 'CIS\Templates\Helpers::timeAgoInWords');
- $template->setTranslator($this->translator);
- $template->lang = $this->getLang();
- $template->parameters = $this->parameters;
- return $template;
- }
Add Comment
Please, Sign In to add comment