/** * Render json content * * @param string $path * @param array $params * @param null $mustClean * @throws \Exception */ public function render($path, $params, $mustClean = null) { $content = $this->jsonHelper->encode($params); $this->_view->setContent($content); }
/** * @param Event $event * @param ViewInterface $view */ public function afterRender(Event $event, ViewInterface $view) { $content = $view->getContent(); $content = preg_replace("/\\s+/", " ", $content); $view->setContent($content); }