RuleLabel.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * Data Model implementing the Address interface
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\SalesRule\Model\Data;
  9. /**
  10. * Class Rule label
  11. *
  12. * @codeCoverageIgnore
  13. */
  14. class RuleLabel extends \Magento\Framework\Api\AbstractExtensibleObject implements
  15. \Magento\SalesRule\Api\Data\RuleLabelInterface
  16. {
  17. const KEY_STORE_ID = 'store_id';
  18. const KEY_STORE_LABEL = 'store_label';
  19. /**
  20. * Get storeId
  21. *
  22. * @return int
  23. */
  24. public function getStoreId()
  25. {
  26. return $this->_get(self::KEY_STORE_ID);
  27. }
  28. /**
  29. * Set store id
  30. *
  31. * @param int $storeId
  32. * @return $this
  33. */
  34. public function setStoreId($storeId)
  35. {
  36. return $this->setData(self::KEY_STORE_ID, $storeId);
  37. }
  38. /**
  39. * Return the label for the store
  40. *
  41. * @return string
  42. */
  43. public function getStoreLabel()
  44. {
  45. return $this->_get(self::KEY_STORE_LABEL);
  46. }
  47. /**
  48. * Set the label for the store
  49. *
  50. * @param string $storeLabel
  51. * @return $this
  52. */
  53. public function setStoreLabel($storeLabel)
  54. {
  55. return $this->setData(self::KEY_STORE_LABEL, $storeLabel);
  56. }
  57. /**
  58. * {@inheritdoc}
  59. *
  60. * @return \Magento\SalesRule\Api\Data\RuleLabelExtensionInterface|null
  61. */
  62. public function getExtensionAttributes()
  63. {
  64. return $this->_getExtensionAttributes();
  65. }
  66. /**
  67. * {@inheritdoc}
  68. *
  69. * @param \Magento\SalesRule\Api\Data\RuleLabelExtensionInterface $extensionAttributes
  70. * @return $this
  71. */
  72. public function setExtensionAttributes(
  73. \Magento\SalesRule\Api\Data\RuleLabelExtensionInterface $extensionAttributes
  74. ) {
  75. return $this->_setExtensionAttributes($extensionAttributes);
  76. }
  77. }