By default, SocialENgine automatically renders a view at the end of each controller action. If you're using a layout it also renders that. This is fine for normal Web pages, but when you're sending an AJAX response you don't want all that. How do you prevent SocialEngine from auto-rendering on an action-by-action basis? With ZendFramework, you can do this:
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender(TRUE);
And you have access to some nice helpers like:
$this->_helper->json($data);
... which will json_encode your $data, output it with JSON headers and die at last, so getting clean JSON returned from the action without view rendering which is pretty much just what I want.
However none of these solutions work in SocialEngine -- $this->_helper always seems to be an empty array as does $this->view->_helper. And return $this->setNoRender() only prevents the current element from rendering, not the whole page.