Write the addReview method, which adds a single product review, represented by a ProductReview object, to the ReviewCollector object. The addReview method does the following when it adds a product review. The ProductReview object is added to the reviewList instance variable. The product name from the ProductReview object is added to the productList instance variable if the product name is not already found in productList. Elements may be added to reviewList and productList in any order.

Respuesta :

Answer:

Explanation:

namespace Jeroen\ReviewIntegration\Observer;

use Magento\Framework\Event\ObserverInterface;

class ProductReview implements ObserverInterface

{

    protected $_storeManager;

    protected $_request;

    public function __construct(

        \Magento\Store\Model\StoreManagerInterface $storeManager,

        \Magento\Framework\App\Request\Http $request

    ) {

        $this->_storeManager = $storeManager;

        $this->_request = $request;

    }

    public function execute(\Magento\Framework\Event\Observer $observer)

    {

         return 'test';

    }

}

ACCESS MORE
EDU ACCESS