Whenever I create a new action in the zend framework controller using the zf CLI tool it creates the corresponding view file. However, I don’t need the view file for every action in the controller.
If I delete that view file manually will it affect my project.xml file or have any other effect on my project ?
No you don’t need to.
Been a while since i worked with Zend Framework. But if memory serves me well, you have two options here.
1 –
$this->_helper->viewRenderer->setNoRender(true);Which will stop the view being rendered
2- You can simply do what you need to do and call
exit()in the end of the of your action.Hope it helps.
Cheers