30 protected $_template =
'Magento_Review::rating/detailed.phtml';
67 $this->_ratingsFactory = $ratingsFactory;
68 $this->_votesFactory = $votesFactory;
70 parent::__construct($context,
$data);
82 if ($this->_coreRegistry->registry(
'review_data')) {
83 $this->setReviewId($this->_coreRegistry->registry(
'review_data')->getReviewId());
94 if (!$this->getRatingCollection()) {
95 if ($this->_coreRegistry->registry(
'review_data')) {
96 $stores = $this->_coreRegistry->registry(
'review_data')->getStores();
106 )->setPositionOrder()->load()->addOptionToItems();
108 $this->_voteCollection = $this->_votesFactory->create()->setReviewFilter(
110 )->addOptionInfo()->load()->addRatingOptions();
111 }
elseif (!$this->getIsIndependentMode()) {
116 )->setPositionOrder()->load()->addOptionToItems();
123 )->setPositionOrder()->load()->addOptionToItems();
124 if (intval($this->
getRequest()->getParam(
'id'))) {
125 $this->_voteCollection = $this->_votesFactory->create()->setReviewFilter(
127 )->addOptionInfo()->load()->addRatingOptions();
132 return $this->getRatingCollection();
142 $this->setIsIndependentMode(
true);
156 if ($this->getIsIndependentMode()) {
157 $ratings = $this->
getRequest()->getParam(
'ratings');
159 if (isset($ratings[
$option->getRatingId()])) {
161 }
elseif (!$this->_voteCollection) {
166 if ($this->_voteCollection) {
167 foreach ($this->_voteCollection as $vote) {
168 if (
$option->getId() == $vote->getOptionId()) {
elseif(isset( $params[ 'redirect_parent']))
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Review\Model\ResourceModel\Rating\CollectionFactory $ratingsFactory, \Magento\Review\Model\ResourceModel\Rating\Option\Vote\CollectionFactory $votesFactory, \Magento\Framework\Registry $registry, array $data=[])
isSelected($option, $rating)