DesignInterface.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View;
  7. /**
  8. * Design Interface
  9. */
  10. interface DesignInterface
  11. {
  12. /**
  13. * Default design area
  14. */
  15. const DEFAULT_AREA = 'frontend';
  16. /**#@+
  17. * Public directories prefix group
  18. */
  19. const PUBLIC_VIEW_DIR = '_view';
  20. const PUBLIC_THEME_DIR = '_theme';
  21. /**#@-*/
  22. /**
  23. * Common node path to theme design configuration
  24. */
  25. const XML_PATH_THEME_ID = 'design/theme/theme_id';
  26. /**
  27. * Set package area
  28. *
  29. * @param string $area
  30. * @return DesignInterface
  31. * @TODO MAGETWO-31474: Remove deprecated method setArea
  32. */
  33. public function setArea($area);
  34. /**
  35. * Retrieve package area
  36. *
  37. * @return string
  38. */
  39. public function getArea();
  40. /**
  41. * Set theme path
  42. *
  43. * @param Design\ThemeInterface|int|string $theme
  44. * @param string|null $area
  45. * @return DesignInterface
  46. */
  47. public function setDesignTheme($theme, $area = null);
  48. /**
  49. * Get default theme which declared in configuration
  50. *
  51. * @param string|null $area
  52. * @param array $params
  53. * @return string
  54. */
  55. public function getConfigurationDesignTheme($area = null, array $params = []);
  56. /**
  57. * Set default design theme
  58. *
  59. * @return DesignInterface
  60. */
  61. public function setDefaultDesignTheme();
  62. /**
  63. * Design theme model getter
  64. *
  65. * @return Design\ThemeInterface
  66. */
  67. public function getDesignTheme();
  68. /**
  69. * Convert theme model into a theme path literal
  70. *
  71. * @param Design\ThemeInterface $theme
  72. * @return string
  73. */
  74. public function getThemePath(Design\ThemeInterface $theme);
  75. /**
  76. * Get locale
  77. *
  78. * @return string
  79. */
  80. public function getLocale();
  81. /**
  82. * Get design settings for current request
  83. *
  84. * @return array
  85. */
  86. public function getDesignParams();
  87. }