CollectionInterface.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View\Design\Theme\File;
  7. /**
  8. * Design Theme File collection interface
  9. */
  10. interface CollectionInterface
  11. {
  12. /**
  13. * Get items
  14. *
  15. * @return \Magento\Framework\View\Design\Theme\FileInterface[]
  16. */
  17. public function getItems();
  18. /**
  19. * Filter out files that do not belong to a theme
  20. *
  21. * @param \Magento\Framework\View\Design\ThemeInterface $theme
  22. * @return CollectionInterface
  23. */
  24. public function addThemeFilter(\Magento\Framework\View\Design\ThemeInterface $theme);
  25. /**
  26. * Set default order
  27. *
  28. * @param string $direction
  29. * @return CollectionInterface
  30. */
  31. public function setDefaultOrder($direction = 'ASC');
  32. /**
  33. * Add field filter to collection
  34. *
  35. * @param string $field
  36. * @param null|string|array $condition
  37. * @return CollectionInterface
  38. */
  39. public function addFieldToFilter($field, $condition = null);
  40. }