Index.php 682 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Rss\Controller\Index;
  8. use Magento\Framework\Exception\NotFoundException;
  9. class Index extends \Magento\Rss\Controller\Index
  10. {
  11. /**
  12. * Index action
  13. *
  14. * @return void
  15. * @throws NotFoundException
  16. */
  17. public function execute()
  18. {
  19. if ($this->_scopeConfig->getValue('rss/config/active', \Magento\Store\Model\ScopeInterface::SCOPE_STORE)) {
  20. $this->_view->loadLayout();
  21. $this->_view->renderLayout();
  22. } else {
  23. throw new NotFoundException(__('Page not found.'));
  24. }
  25. }
  26. }