resultPageFactory = $resultPageFactory; parent::__construct($context); } /** * execute the action * * @return \Magento\Backend\Model\View\Result\Page|\Magento\Framework\View\Result\Page */ public function execute() { $this->setPageData(); return $this->getResultPage(); } /** * instantiate result page object * * @return \Magento\Backend\Model\View\Result\Page|\Magento\Framework\View\Result\Page */ public function getResultPage() { if (is_null($this->resultPage)) { $this->resultPage = $this->resultPageFactory->create(); } return $this->resultPage; } /** * set page data * * @return $this */ protected function setPageData() { $resultPage = $this->getResultPage(); //$resultPage->setActiveMenu('Smartwave_Dailydeals::dailydeal'); $resultPage->getConfig()->getTitle()->prepend((__('Dailydeals'))); return $this; } }