<?php


namespace Magetop\Advancepreview\Controller\Adminhtml;

use Magento\Backend\App\Action;


class ProductPreview extends Action
{
    protected  $jsonFactory;
    function __construct(
        Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $jsonFactory
    )
    {
        parent::__construct($context);
        $this->jsonFactory = $jsonFactory;
    }
    public function execute()
    {
        // TODO: Implement execute() method.
    }
    function getAjaxResponse($response) {
        return $this->jsonFactory->create()->setData($response);
    }
    protected function _isAllowed()
    {
        return true;
    }
}
