Roh*_*tha 2 php zend-framework2
我使用ZF2,我需要在添加和编辑操作中呈现相同的视图(html页面).有没有办法在ZF2中做到这一点?
Rob*_*len 13
在控制器中,您可以设置将呈现的视图脚本:
function someAction()
{
$result = new ViewModel();
$result->setTemplate('somemodule/somecontroller/arbitraryscript');
return $result;
}
Run Code Online (Sandbox Code Playgroud)