MessageInterface.php 869 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * System message
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\Notification;
  9. /**
  10. * Interface for system messages
  11. *
  12. * Interface MessageInterface
  13. *
  14. * @api
  15. * @since 100.0.2
  16. */
  17. interface MessageInterface
  18. {
  19. const SEVERITY_CRITICAL = 1;
  20. const SEVERITY_MAJOR = 2;
  21. const SEVERITY_MINOR = 3;
  22. const SEVERITY_NOTICE = 4;
  23. /**
  24. * Retrieve unique message identity
  25. *
  26. * @return string
  27. */
  28. public function getIdentity();
  29. /**
  30. * Check whether
  31. *
  32. * @return bool
  33. */
  34. public function isDisplayed();
  35. /**
  36. * Retrieve message text
  37. *
  38. * @return string
  39. */
  40. public function getText();
  41. /**
  42. * Retrieve message severity
  43. *
  44. * @return int
  45. */
  46. public function getSeverity();
  47. }