2014-03-24 17:45
浏览 30


In a class file, I am trying to render a .phtml file into a variable and pass the HTML output of that .phtml file to a variable in another ViewModel. How do I do this in ZF2?

The code I have so far is, which doesn't really seem to work:

$layout = new ViewModel();

$viewModel = new ViewModel();
$viewModel->setVariable('formBody', $layout);
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题