StateInterface.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Translate\Inline;
  7. /**
  8. * Controls and represents the state of the inline translation processing.
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface StateInterface
  14. {
  15. /**
  16. * Disable inline translation
  17. *
  18. * @return void
  19. */
  20. public function disable();
  21. /**
  22. * Enable inline translation
  23. *
  24. * @return void
  25. */
  26. public function enable();
  27. /**
  28. * Check if inline translation enabled/disabled
  29. *
  30. * @return bool
  31. */
  32. public function isEnabled();
  33. /**
  34. * Suspend inline translation
  35. *
  36. * Store current inline translation status
  37. * and apply new status or disable inline translation.
  38. *
  39. * @param bool $status
  40. * @return void
  41. */
  42. public function suspend($status = false);
  43. /**
  44. * Disable inline translation
  45. *
  46. * Restore inline translation status
  47. * or apply new status.
  48. *
  49. * @param bool $status
  50. * @return void
  51. */
  52. public function resume($status = true);
  53. }