<?php
namespace PortalPeople\DisabledDates\Controller\Adminhtml\Date;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;

class Index extends Action
{
    const ADMIN_RESOURCE = 'PortalPeople_DisabledDates::disabled_dates';

    protected $resultPageFactory;

    public function __construct(Context $context, PageFactory $resultPageFactory)
    {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    public function execute()
    {
        $resultPage = $this->resultPageFactory->create();
        $resultPage->setActiveMenu('PortalPeople_DisabledDates::disabled_dates');
        $resultPage->getConfig()->getTitle()->prepend(__('Manage Disabled Dates'));
        
        return $resultPage;
    }

    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('PortalPeople_DisabledDates::disabled_dates');
    }
}
