Unread.php 776 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Collection of unread notifications
  8. *
  9. * @author Magento Core Team <core@magentocommerce.com>
  10. */
  11. namespace Magento\AdminNotification\Model\ResourceModel\Inbox\Collection;
  12. /**
  13. * @api
  14. * @since 100.0.2
  15. */
  16. class Unread extends \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection
  17. {
  18. /**
  19. * Init collection select
  20. *
  21. * @return \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread
  22. */
  23. protected function _initSelect()
  24. {
  25. parent::_initSelect();
  26. $this->addFilter('is_remove', 0);
  27. $this->addFilter('is_read', 0);
  28. $this->setOrder('date_added');
  29. return $this;
  30. }
  31. }