Collection.php 901 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\AdminNotification\Model\ResourceModel\Inbox;
  7. /**
  8. * AdminNotification Inbox model
  9. *
  10. * @api
  11. * @author Magento Core Team <core@magentocommerce.com>
  12. * @api
  13. * @since 100.0.2
  14. */
  15. class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
  16. {
  17. /**
  18. * Resource collection initialization
  19. *
  20. * @return void
  21. */
  22. protected function _construct()
  23. {
  24. $this->_init(
  25. \Magento\AdminNotification\Model\Inbox::class,
  26. \Magento\AdminNotification\Model\ResourceModel\Inbox::class
  27. );
  28. }
  29. /**
  30. * Add remove filter
  31. *
  32. * @return $this
  33. */
  34. public function addRemoveFilter()
  35. {
  36. $this->getSelect()->where('is_remove=?', 0);
  37. return $this;
  38. }
  39. }