<?php
namespace Magetop\Advancepreview\Controller\ReWrites;
use Magento\Framework\App\Action;
use Magento\Framework\Exception\NotFoundException;
use Magento\Framework\Controller\ResultFactory;

class WishlistIndex extends \Magento\Wishlist\Controller\Index\Index
{
    protected $pageFactory;
    public function __construct(
        Action\Context $context, \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider,
        \Magento\Framework\View\Result\PageFactory $pageFactory
    )
    {
        parent::__construct($context, $wishlistProvider);
        $this->pageFactory = $pageFactory;
    }

    public function execute()
    {
        $resultPageFactory = $this->pageFactory->create();
        // Add page title
        $resultPageFactory->getConfig()->getTitle()->set(__('My Requested Offer'));
        // Add breadcrumb
        /** @var \Magento\Theme\Block\Html\Breadcrumbs */
        if($resultPageFactory->getLayout()->getBlock('breadcrumbs'))
        {
            $breadcrumbs = $resultPageFactory->getLayout()->getBlock('breadcrumbs');
            $breadcrumbs->addCrumb('home',
                [
                    'label' => __('Home'),
                    'title' => __('Home'),
                    'link' => $this->_url->getUrl('')
                ]
            );
            $breadcrumbs->addCrumb('my_request_offer',
                [
                    'label' => __('My Requested Offer'),
                    'title' => __('My Requested Offer')
                ]
            );
        }
        return $resultPageFactory;
    }
}
