FileInterface.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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\Customization;
  7. /**
  8. * Theme service file interface
  9. */
  10. interface FileInterface
  11. {
  12. /**
  13. * Get type of file
  14. *
  15. * @return string
  16. */
  17. public function getType();
  18. /**
  19. * Gets absolute path to a custom file
  20. *
  21. * @param \Magento\Framework\View\Design\Theme\FileInterface $file
  22. * @return string
  23. */
  24. public function getFullPath(\Magento\Framework\View\Design\Theme\FileInterface $file);
  25. /**
  26. * Creates new custom file and binds to concrete service model
  27. *
  28. * @return \Magento\Framework\View\Design\Theme\FileInterface
  29. */
  30. public function create();
  31. /**
  32. * Saves related data to custom file
  33. *
  34. * @param \Magento\Framework\View\Design\Theme\FileInterface $file
  35. * @return $this
  36. */
  37. public function save(\Magento\Framework\View\Design\Theme\FileInterface $file);
  38. /**
  39. * Deletes related data to custom file
  40. *
  41. * @param \Magento\Framework\View\Design\Theme\FileInterface $file
  42. * @return $this
  43. */
  44. public function delete(\Magento\Framework\View\Design\Theme\FileInterface $file);
  45. /**
  46. * Prepare file content before it will be saved
  47. *
  48. * @param \Magento\Framework\View\Design\Theme\FileInterface $file
  49. * @return $this
  50. */
  51. public function prepareFile(\Magento\Framework\View\Design\Theme\FileInterface $file);
  52. }