Entity.php 795 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Review\Model\Rating;
  7. /**
  8. * Ratings entity model
  9. *
  10. * @method string getEntityCode()
  11. * @method \Magento\Review\Model\Rating\Entity setEntityCode(string $value)
  12. *
  13. * @author Magento Core Team <core@magentocommerce.com>
  14. * @codeCoverageIgnore
  15. */
  16. class Entity extends \Magento\Framework\Model\AbstractModel
  17. {
  18. /**
  19. * @return void
  20. */
  21. protected function _construct()
  22. {
  23. $this->_init(\Magento\Review\Model\ResourceModel\Rating\Entity::class);
  24. }
  25. /**
  26. * @param string $entityCode
  27. * @return int
  28. */
  29. public function getIdByCode($entityCode)
  30. {
  31. return $this->_getResource()->getIdByCode($entityCode);
  32. }
  33. }