$this->_helper->layout()->disableLayout();
Of course in ZF2 this method doesn't work but there are some other ways how it is possible to do:
1. Set viewModel as standalone model in controller action:
public function someAction() { $viewModel = new ViewModel(array( 'foo' => 'bar' )); $viewModel->setTerminal(true); return $viewModel; }
2. Create empty layout and use it in controller action:
Create almost empty layout: module/MyModule/view/layout/empty.phtml with only content:
<?php echo $this->content; ?>
Then use this layout in controller action:
$this->layout('layout/empty');
3. Use response object for output content:
$response = $this->getResponse(); $response->setContent("Some content"); return $response;
That's all. May be there are some other ways to do this. As for me I prefer the first way, it looks simple and clean.
Howdy! This post could not be written any better! Reading through this post reminds me of my good old room mate! He always kept talking about this. I will forward this post to him. Fairly certain he will have a good read. Thank you for sharing!
ReplyDeleteHow I can Create YouTube Channel?
Thanks. It's awesome ,it is realy helpful
ReplyDeleteWeb Development Company in Indore
This is very essential part in Zend Frame work process to disable the layout rendering.I am very grateful to this blog for explaining this process with example.
ReplyDeleteWeb Design Companies | Website Design Companies
Great post, thanks for sharing..
ReplyDeleteWordpress Development Company
Web Design India
This comment has been removed by the author.
ReplyDeleteReally a great addition. I have read this marvelous post. Thanks for sharing information about it. I really like that. Thanks so lot for your convene.ad agencies nyc
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog.
ReplyDeleteDevops Training courses
Devops Training in Bangalore
Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
ReplyDeletepython Course in Pune
python Course institute in Chennai
python Training institute in Bangalore
It would have been the happiest moment for you,I mean if we have been waiting for something to happen and when it happens we forgot all hardwork and wait for getting that happened.
ReplyDeleteSelenium training in Chennai
Selenium training in Bangalore
Selenium training in Pune
Selenium Online training
Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck…
ReplyDeleteJoin Cloud Computing Training in Bangalore at Softgen Infotech. Learn from Certified Professionals with 10+ Years of experience in Cloud Computing. Get 100% Placement Assistance. Placements in MNC after successful course completion.
Thank you for solving my web development doubts.
ReplyDeleteJava training in Chennai
Java training in Bangalore
Java training in Hyderabad
Java Training in Coimbatore
Java Online Training
Thanks for giving an idea to solve the doubts i had regarding web development! keep us posted!
ReplyDeletedata science training in chennai
ccna training in chennai
iot training in chennai
cyber security training in chennai
ethical hacking training in chennai
smm panel
ReplyDeletesmm panel
Https://isilanlariblog.com/
İnstagram takipçi satın al
hirdavatciburada.com
beyazesyateknikservisi.com.tr
Servis
tiktok jeton hilesi
kadıköy arçelik klima servisi
ReplyDeletebeykoz toshiba klima servisi
üsküdar toshiba klima servisi
beykoz beko klima servisi
üsküdar beko klima servisi
pendik lg klima servisi
pendik alarko carrier klima servisi
pendik daikin klima servisi
tuzla toshiba klima servisi
Great post. keep sharing such a worthy information.
ReplyDeleteAWS Training institute in Chennai