ZF2-201: Layout rendering on JsonModel return

Issue Type: Improvement Created: 2012-03-07T16:51:19.000+0000 Last Updated: 2012-03-24T01:12:28.000+0000 Status: Resolved Fix version(s): Reporter: Evgheni Poleacov (zendmania) Assignee: Rob Allen (rob) Tags: - Zend\View

Related issues: Attachments:


When we return JsonModel from controller, and attach JsonStrategy with high priority, Zend\View will render layout as well. This effect solved by JsonModel "terminal" method:

<pre class="highlight">
public function testAction(){
  $result = new ViewModel\JsonModel(array(
  return $result;

But maybe better to set $terminate property to true by default, because often JsonModel is terminator.


Posted by Rob Allen (rob) on 2012-03-07T18:01:31.000+0000


Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.