ProductWebsiteLink.php 975 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Catalog\Model;
  7. class ProductWebsiteLink extends \Magento\Framework\Api\AbstractSimpleObject implements
  8. \Magento\Catalog\Api\Data\ProductWebsiteLinkInterface
  9. {
  10. /**#@+
  11. * Field names
  12. */
  13. const KEY_SKU = 'sku';
  14. const WEBSITE_ID = 'website_id';
  15. /**#@-*/
  16. /**
  17. * {@inheritdoc}
  18. */
  19. public function getSku()
  20. {
  21. return $this->_get(self::KEY_SKU);
  22. }
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function getWebsiteId()
  27. {
  28. return $this->_get(self::WEBSITE_ID);
  29. }
  30. /**
  31. * @param string $sku
  32. * @return $this
  33. */
  34. public function setSku($sku)
  35. {
  36. return $this->setData(self::KEY_SKU, $sku);
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function setWebsiteId($websiteId)
  42. {
  43. return $this->setData(self::WEBSITE_ID, $websiteId);
  44. }
  45. }