public function render($template, array $variables = array())
{
if (!empty($this->forms)) {
foreach ($this->forms as $form) {
// using assign to pass the form as global
$this->environment->addGlobal('form_' . $form->getName(), $form);
}
}
return $this->environment->render($template, $variables);
}