InlineInterface.php 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Translate;
  7. /**
  8. * Inline translation interface
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface InlineInterface
  14. {
  15. /**
  16. * Returns additional html attribute if needed by client.
  17. *
  18. * @param mixed $tagName
  19. * @return mixed
  20. */
  21. public function getAdditionalHtmlAttribute($tagName = null);
  22. /**
  23. * Check if inline translates is allowed
  24. *
  25. * @return bool
  26. */
  27. public function isAllowed();
  28. /**
  29. * Replace translation templates with HTML fragments
  30. *
  31. * @param array|string $body
  32. * @param bool $isJson
  33. * @return \Magento\Framework\Translate\InlineInterface
  34. */
  35. public function processResponseBody(&$body, $isJson = false);
  36. /**
  37. * Retrieve Inline Parser instance
  38. *
  39. * @return Inline\ParserInterface
  40. */
  41. public function getParser();
  42. }