| Current Path : /var/www/html/app/code/FlipsDigital/TextbookList/Controller/Adminhtml/TextbookList/ |
| Current File : /var/www/html/app/code/FlipsDigital/TextbookList/Controller/Adminhtml/TextbookList/Index.php |
<?php
/**
* index.php
*
* @copyright Copyright © 2021 FlipsDigital. All rights reserved.
* @author calvin.so@flipsdigital.com
*/
namespace FlipsDigital\TextbookList\Controller\Adminhtml\TextbookList;
use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
class Index extends Action
{
/**
* @var PageFactory
*/
protected $resultPageFactory;
/**
* @param Context $context
* @param PageFactory $resultPageFactory
*/
public function __construct(
Context $context,
PageFactory $resultPageFactory
) {
parent::__construct($context);
$this->resultPageFactory = $resultPageFactory;
}
/**
* Check the permission to run it
*
* @return boolean
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('FlipsDigital_TextbookList::textbooklist');
}
/**
* Index action
*
* @return \Magento\Backend\Model\View\Result\Page
*/
public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->setActiveMenu('FlipsDigital_TextbookList::textbooklist');
$resultPage->getConfig()->getTitle()->prepend(__('Textbook List'));
return $resultPage;
}
}