CommentCreation.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Model\Order\Creditmemo;
  7. use Magento\Sales\Api\Data\CreditmemoCommentCreationInterface;
  8. /**
  9. * Class CommentCreation
  10. */
  11. class CommentCreation implements CreditmemoCommentCreationInterface
  12. {
  13. /**
  14. * @var \Magento\Sales\Api\Data\CreditmemoCommentCreationExtensionInterface
  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\CreditmemoCommentCreationExtensionInterface|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\CreditmemoCommentCreationExtensionInterface $extensionAttributes
  38. * @return $this
  39. */
  40. public function setExtensionAttributes(
  41. \Magento\Sales\Api\Data\CreditmemoCommentCreationExtensionInterface $extensionAttributes
  42. ) {
  43. $this->extensionAttributes = $extensionAttributes;
  44. return $this;
  45. }
  46. /**
  47. * @inheritdoc
  48. */
  49. public function getComment()
  50. {
  51. return $this->comment;
  52. }
  53. /**
  54. * @inheritdoc
  55. */
  56. public function setComment($comment)
  57. {
  58. $this->comment = $comment;
  59. return $this;
  60. }
  61. /**
  62. * @inheritdoc
  63. */
  64. public function getIsVisibleOnFront()
  65. {
  66. return $this->isVisibleOnFront;
  67. }
  68. /**
  69. * @inheritdoc
  70. */
  71. public function setIsVisibleOnFront($isVisibleOnFront)
  72. {
  73. $this->isVisibleOnFront = $isVisibleOnFront;
  74. return $this;
  75. }
  76. }