95 \
Magento\Review\Helper\Data $reviewData,
97 \
Magento\Review\Model\RatingFactory $ratingFactory,
105 $this->_reviewData = $reviewData;
107 $this->_ratingFactory = $ratingFactory;
111 parent::__construct($context,
$data);
112 $this->jsLayout = isset(
$data[
'jsLayout']) ?
$data[
'jsLayout'] : [];
124 parent::_construct();
126 $this->setAllowWriteReviewFlag(
128 || $this->_reviewData->getIsGuestAllowToWrite()
130 if (!$this->getAllowWriteReviewFlag()) {
131 $queryParam = $this->urlEncoder->encode(
132 $this->
getUrl(
'*/*/*', [
'_current' =>
true]) .
'#review-form' 136 'customer/account/login/',
150 return $this->serializer->serialize($this->jsLayout);
161 return $this->productRepository->getById(
164 $this->_storeManager->getStore()->getId()
176 'review/product/post',
192 return $this->_ratingFactory->create()->getResourceCollection()->addEntityFilter(
194 )->setPositionOrder()->addRatingPerStoreName(
195 $this->_storeManager->getStore()->getId()
197 $this->_storeManager->getStore()->getId()
200 )->load()->addOptionToItems();
210 return $this->customerUrl->getRegisterUrl();
220 return $this->
getRequest()->getParam(
'id',
false);
getUrl($route='', $params=[])
const REFERER_QUERY_PARAM_NAME