FileInterface.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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;
  7. /**
  8. * Theme file interface
  9. */
  10. interface FileInterface
  11. {
  12. /**
  13. * Set customization service model
  14. *
  15. * @param Customization\FileInterface $service
  16. * @return $this
  17. */
  18. public function setCustomizationService(Customization\FileInterface $service);
  19. /**
  20. * Get customization service model
  21. *
  22. * @return \Magento\Framework\View\Design\Theme\Customization\FileInterface
  23. */
  24. public function getCustomizationService();
  25. /**
  26. * Attaches selected theme to current file
  27. *
  28. * @param \Magento\Framework\View\Design\ThemeInterface $theme
  29. * @return $this
  30. */
  31. public function setTheme(\Magento\Framework\View\Design\ThemeInterface $theme);
  32. /**
  33. * Get theme model
  34. *
  35. * @return \Magento\Framework\View\Design\ThemeInterface
  36. */
  37. public function getTheme();
  38. /**
  39. * Set filename of custom file
  40. *
  41. * @param string $fileName
  42. * @return $this
  43. */
  44. public function setFileName($fileName);
  45. /**
  46. * Get filename of custom file
  47. *
  48. * @return string|null
  49. */
  50. public function getFileName();
  51. /**
  52. * Return absolute path to file of customization
  53. *
  54. * @return string
  55. */
  56. public function getFullPath();
  57. /**
  58. * Get short file information which can be serialized
  59. *
  60. * @return array
  61. */
  62. public function getFileInfo();
  63. /**
  64. * Get content of current file
  65. *
  66. * @return string
  67. */
  68. public function getContent();
  69. /**
  70. * Save custom file
  71. *
  72. * @return $this
  73. */
  74. public function save();
  75. /**
  76. * Delete custom file
  77. *
  78. * @return $this
  79. */
  80. public function delete();
  81. }