CommentCreation.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Model\Order\Shipment;
  7. use Magento\Sales\Api\Data\ShipmentCommentCreationInterface;
  8. /**
  9. * Class CommentCreation
  10. */
  11. class CommentCreation implements ShipmentCommentCreationInterface
  12. {
  13. /**
  14. * @var \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface
  15. */
  16. private $extensionAttributes;
  17. /**
  18. * @var string
  19. */
  20. private $comment;
  21. /**
  22. * @var int
  23. */
  24. private $isVisibleOnFront;
  25. /**
  26. * Retrieve existing extension attributes object or create a new one.
  27. *
  28. * @return \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface|null
  29. */
  30. public function getExtensionAttributes()
  31. {
  32. return $this->extensionAttributes;
  33. }
  34. /**
  35. * Set an extension attributes object.
  36. *
  37. * @param \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface $extensionAttributes
  38. * @return $this
  39. */
  40. public function setExtensionAttributes(
  41. \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface $extensionAttributes
  42. ) {
  43. $this->extensionAttributes = $extensionAttributes;
  44. return $this;
  45. }
  46. /**
  47. * Gets the comment for the invoice.
  48. *
  49. * @return string Comment.
  50. */
  51. public function getComment()
  52. {
  53. return $this->comment;
  54. }
  55. /**
  56. * Sets the comment for the invoice.
  57. *
  58. * @param string $comment
  59. * @return $this
  60. */
  61. public function setComment($comment)
  62. {
  63. $this->comment = $comment;
  64. return $this;
  65. }
  66. /**
  67. * Gets the is-visible-on-storefront flag value for the invoice.
  68. *
  69. * @return int Is-visible-on-storefront flag value.
  70. */
  71. public function getIsVisibleOnFront()
  72. {
  73. return $this->isVisibleOnFront;
  74. }
  75. /**
  76. * Sets the is-visible-on-storefront flag value for the invoice.
  77. *
  78. * @param int $isVisibleOnFront
  79. * @return $this
  80. */
  81. public function setIsVisibleOnFront($isVisibleOnFront)
  82. {
  83. $this->isVisibleOnFront = $isVisibleOnFront;
  84. return $this;
  85. }
  86. }