Collection.php 923 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Integration\Model\ResourceModel\Integration;
  7. /**
  8. * Integrations collection.
  9. */
  10. class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
  11. {
  12. /**
  13. * Resource collection initialization.
  14. *
  15. * @return void
  16. */
  17. protected function _construct()
  18. {
  19. $this->_init(
  20. \Magento\Integration\Model\Integration::class,
  21. \Magento\Integration\Model\ResourceModel\Integration::class
  22. );
  23. }
  24. /**
  25. * Add filter for finding integrations with unsecure URLs.
  26. *
  27. * @return $this
  28. */
  29. public function addUnsecureUrlsFilter()
  30. {
  31. return $this->addFieldToFilter(
  32. ['endpoint', 'identity_link_url'],
  33. [['like' => 'http:%'], ['like' => 'http:%']]
  34. );
  35. }
  36. }