Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Link.php
Go to the documentation of this file.
1 <?php
7 namespace Magento\Bundle\Model;
8 
15 {
19  const KEY_ID = 'id';
20  const KEY_SKU = 'sku';
21  const KEY_OPTION_ID = 'option_id';
22  const KEY_QTY = 'qty';
23  const KEY_POSITION = 'position';
24  const KEY_IS_DEFAULT = 'is_default';
25  const KEY_PRICE = 'price';
26  const KEY_PRICE_TYPE = 'price_type';
27  const KEY_CAN_CHANGE_QUANTITY = 'selection_can_change_quantity';
33  public function getId()
34  {
35  return $this->getData(self::KEY_ID);
36  }
37 
41  public function setId($id)
42  {
43  return $this->setData(self::KEY_ID, $id);
44  }
45 
49  public function getSku()
50  {
51  return $this->getData(self::KEY_SKU);
52  }
53 
57  public function getOptionId()
58  {
59  return $this->getData(self::KEY_OPTION_ID);
60  }
61 
65  public function getQty()
66  {
67  return $this->getData(self::KEY_QTY);
68  }
69 
73  public function getPosition()
74  {
75  return $this->getData(self::KEY_POSITION);
76  }
77 
81  public function getIsDefault()
82  {
83  return $this->getData(self::KEY_IS_DEFAULT);
84  }
85 
89  public function getPrice()
90  {
91  return $this->getData(self::KEY_PRICE);
92  }
93 
97  public function getPriceType()
98  {
99  return $this->getData(self::KEY_PRICE_TYPE);
100  }
101 
105  public function getCanChangeQuantity()
106  {
107  return $this->getData(self::KEY_CAN_CHANGE_QUANTITY);
108  }
109 
116  public function setSku($sku)
117  {
118  return $this->setData(self::KEY_SKU, $sku);
119  }
120 
127  public function setOptionId($optionId)
128  {
129  return $this->setData(self::KEY_OPTION_ID, $optionId);
130  }
131 
138  public function setQty($qty)
139  {
140  return $this->setData(self::KEY_QTY, $qty);
141  }
142 
149  public function setPosition($position)
150  {
151  return $this->setData(self::KEY_POSITION, $position);
152  }
153 
160  public function setIsDefault($isDefault)
161  {
162  return $this->setData(self::KEY_IS_DEFAULT, $isDefault);
163  }
164 
171  public function setPrice($price)
172  {
173  return $this->setData(self::KEY_PRICE, $price);
174  }
175 
182  public function setPriceType($priceType)
183  {
184  return $this->setData(self::KEY_PRICE_TYPE, $priceType);
185  }
186 
193  public function setCanChangeQuantity($canChangeQuantity)
194  {
195  return $this->setData(self::KEY_CAN_CHANGE_QUANTITY, $canChangeQuantity);
196  }
197 
203  public function getExtensionAttributes()
204  {
205  return $this->_getExtensionAttributes();
206  }
207 
214  public function setExtensionAttributes(\Magento\Bundle\Api\Data\LinkExtensionInterface $extensionAttributes)
215  {
216  return $this->_setExtensionAttributes($extensionAttributes);
217  }
218 }
$id
Definition: fieldset.phtml:14
_setExtensionAttributes(\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes)
$price
$priceType
Definition: msrp.phtml:18