how to render template into variable in ZF2

Categories: howto

Следующий пример показывает как можно просто отрендерить шаблон в переменную в Zend Framework 2

public function coolAction()
	$d = array();
	$r = new PhpRenderer();
	$resolver = new \Zend\View\Resolver\TemplateMapResolver();
		'confirmation_template' => __DIR__ . '/../../../view/user/mail/confirmation.phtml' // full path to template
	$model = new ViewModel($d);
	$x = $r->render($model);

No webmentions were found.

Comment with Disqus

Comment with an Email

No comments here yet Write here gently

Comment with Talkyard

Comments powered by Talkyard.