Message.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\AdminNotification\Model\System;
  7. /**
  8. * @codeCoverageIgnore
  9. * @api
  10. * @since 100.0.2
  11. */
  12. class Message extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\Notification\MessageInterface
  13. {
  14. /**
  15. * @return void
  16. */
  17. protected function _construct()
  18. {
  19. $this->_init(\Magento\AdminNotification\Model\ResourceModel\System\Message::class);
  20. }
  21. /**
  22. * Check whether
  23. *
  24. * @return bool
  25. */
  26. public function isDisplayed()
  27. {
  28. return true;
  29. }
  30. /**
  31. * Retrieve message text
  32. *
  33. * @return string
  34. */
  35. public function getText()
  36. {
  37. return $this->getData('text');
  38. }
  39. /**
  40. * Retrieve message severity
  41. *
  42. * @return int
  43. */
  44. public function getSeverity()
  45. {
  46. return $this->_getData('severity');
  47. }
  48. /**
  49. * Retrieve unique message identity
  50. *
  51. * @return string
  52. */
  53. public function getIdentity()
  54. {
  55. return $this->_getData('identity');
  56. }
  57. }