ViewInterface.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\App;
  7. /**
  8. * Introduced as a facade for presentation related operations.
  9. * Later replaced with Magento\Framework\View\Result component
  10. *
  11. * @api
  12. * @deprecated 101.0.0
  13. * @see \Magento\Framework\View\Result\Layout
  14. * @since 100.0.2
  15. */
  16. interface ViewInterface
  17. {
  18. /**
  19. * Load layout updates
  20. *
  21. * @return ViewInterface
  22. */
  23. public function loadLayoutUpdates();
  24. /**
  25. * Rendering layout
  26. *
  27. * @param string $output
  28. * @return ViewInterface
  29. */
  30. public function renderLayout($output = '');
  31. /**
  32. * Retrieve the default layout handle name for the current action
  33. *
  34. * @return string
  35. */
  36. public function getDefaultLayoutHandle();
  37. /**
  38. * Load layout by handles(s)
  39. *
  40. * @param string|null|bool $handles
  41. * @param bool $generateBlocks
  42. * @param bool $generateXml
  43. * @param bool $addActionHandles
  44. * @return ViewInterface
  45. * @throws \RuntimeException
  46. */
  47. public function loadLayout($handles = null, $generateBlocks = true, $generateXml = true, $addActionHandles = true);
  48. /**
  49. * Generate layout xml
  50. *
  51. * @return ViewInterface
  52. */
  53. public function generateLayoutXml();
  54. /**
  55. * Add layout updates handles associated with the action page
  56. *
  57. * @param array $parameters page parameters
  58. * @param string $defaultHandle
  59. * @return bool
  60. */
  61. public function addPageLayoutHandles(array $parameters = [], $defaultHandle = null);
  62. /**
  63. * Generate layout blocks
  64. *
  65. * @return ViewInterface
  66. */
  67. public function generateLayoutBlocks();
  68. /**
  69. * Retrieve current page object
  70. *
  71. * @return \Magento\Framework\View\Result\Page
  72. */
  73. public function getPage();
  74. /**
  75. * Retrieve current layout object
  76. *
  77. * @return \Magento\Framework\View\LayoutInterface
  78. */
  79. public function getLayout();
  80. /**
  81. * Add layout handle by full controller action name
  82. *
  83. * @return ViewInterface
  84. */
  85. public function addActionLayoutHandles();
  86. /**
  87. * Set isLayoutLoaded flag
  88. *
  89. * @param bool $value
  90. * @return void
  91. */
  92. public function setIsLayoutLoaded($value);
  93. /**
  94. * Returns is layout loaded
  95. *
  96. * @return bool
  97. */
  98. public function isLayoutLoaded();
  99. }