Collection.php 978 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Review statuses collection
  8. *
  9. * @author Magento Core Team <core@magentocommerce.com>
  10. */
  11. namespace Magento\Review\Model\ResourceModel\Review\Status;
  12. class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
  13. {
  14. /**
  15. * Review status table
  16. *
  17. * @var string
  18. */
  19. protected $_reviewStatusTable;
  20. /**
  21. * Collection model initialization
  22. *
  23. * @return void
  24. */
  25. protected function _construct()
  26. {
  27. $this->_init(
  28. \Magento\Review\Model\Review\Status::class,
  29. \Magento\Review\Model\ResourceModel\Review\Status::class
  30. );
  31. }
  32. /**
  33. * Convert items array to array for select options
  34. *
  35. * @return array
  36. */
  37. public function toOptionArray()
  38. {
  39. return parent::_toOptionArray('status_id', 'status_code');
  40. }
  41. }