Category: zf2

  • zf2 disable the view completely disable the layout within controller change view

    To disable the view completely, from within a controller action, you should return a Response object:  [php] < ?php namespace SomeModule\Controller; use Zend\Mvc\Controller\ActionController,     Zend\View\Model\ViewModel; class SomeController extends ActionController {     public function someAction()     {         $response = $this->getResponse();         $response->setStatusCode(200);        …