12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Review\Model\Review;
- /**
- * Review summary
- *
- * @api
- *
- * @codeCoverageIgnore
- * @since 100.0.2
- */
- class Summary extends \Magento\Framework\Model\AbstractModel
- {
- /**
- * @param \Magento\Framework\Model\Context $context
- * @param \Magento\Framework\Registry $registry
- * @param \Magento\Review\Model\ResourceModel\Review\Summary $resource
- * @param \Magento\Review\Model\ResourceModel\Review\Summary\Collection $resourceCollection
- * @param array $data
- */
- public function __construct(
- \Magento\Framework\Model\Context $context,
- \Magento\Framework\Registry $registry,
- \Magento\Review\Model\ResourceModel\Review\Summary $resource,
- \Magento\Review\Model\ResourceModel\Review\Summary\Collection $resourceCollection,
- array $data = []
- ) {
- parent::__construct($context, $registry, $resource, $resourceCollection, $data);
- }
- /**
- * Get entity primary key value
- *
- * @return int
- */
- public function getEntityPkValue()
- {
- return $this->_getData('entity_pk_value');
- }
- /**
- * Get rating summary data
- *
- * @return string
- */
- public function getRatingSummary()
- {
- return $this->_getData('rating_summary');
- }
- /**
- * Get count of reviews
- *
- * @return int
- */
- public function getReviewsCount()
- {
- return $this->_getData('reviews_count');
- }
- }
|