ThemeInterface.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View\Design;
  7. /**
  8. * Interface ThemeInterface
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface ThemeInterface
  14. {
  15. /**
  16. * Separator between theme_path elements
  17. */
  18. const PATH_SEPARATOR = '/';
  19. /**
  20. * Separator between parts of full theme code (package and theme code)
  21. */
  22. const CODE_SEPARATOR = '/';
  23. /**
  24. * Physical theme type
  25. */
  26. const TYPE_PHYSICAL = 0;
  27. /**
  28. * Virtual theme type
  29. */
  30. const TYPE_VIRTUAL = 1;
  31. /**
  32. * Staging theme type
  33. */
  34. const TYPE_STAGING = 2;
  35. /**
  36. * Retrieve code of an area a theme belongs to
  37. *
  38. * @return string
  39. */
  40. public function getArea();
  41. /**
  42. * Retrieve theme path unique within an area
  43. *
  44. * @return string
  45. */
  46. public function getThemePath();
  47. /**
  48. * Retrieve theme path unique across areas
  49. *
  50. * @return string
  51. */
  52. public function getFullPath();
  53. /**
  54. * Retrieve parent theme instance
  55. *
  56. * @return ThemeInterface|null
  57. */
  58. public function getParentTheme();
  59. /**
  60. * Get code of the theme
  61. *
  62. * @return string
  63. */
  64. public function getCode();
  65. /**
  66. * Check if theme is physical
  67. *
  68. * @return bool
  69. */
  70. public function isPhysical();
  71. /**
  72. * Return the full theme inheritance sequence, from the root theme till a specified one
  73. * Format: array([<root_theme>, ..., <parent_theme>,] <current_theme>)
  74. *
  75. * @return ThemeInterface[]
  76. */
  77. public function getInheritedThemes();
  78. /**
  79. * Get theme id
  80. *
  81. * @return int
  82. */
  83. public function getId();
  84. }