Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ProductRender.php
Go to the documentation of this file.
1 <?php
8 namespace Magento\Catalog\Model;
9 
13 
18 {
22  public function getAddToCartButton()
23  {
24  return $this->getData('add_to_cart_button');
25  }
26 
30  public function setAddToCartButton(ButtonInterface $addToCartButton)
31  {
32  $this->setData('add_to_cart_button', $addToCartButton);
33  }
34 
38  public function getAddToCompareButton()
39  {
40  return $this->getData('add_to_compare_button');
41  }
42 
46  public function setAddToCompareButton(ButtonInterface $compareButton)
47  {
48  $this->setData('add_to_compare_button', $compareButton);
49  }
50 
54  public function getPriceInfo()
55  {
56  return $this->getData('price_info');
57  }
58 
62  public function setPriceInfo(PriceInfoInterface $priceInfo)
63  {
64  $this->setData('price_info', $priceInfo);
65  }
66 
70  public function getImages()
71  {
72  return $this->getData('images');
73  }
74 
78  public function setImages(array $images)
79  {
80  $this->setData('images', $images);
81  }
82 
86  public function getUrl()
87  {
88  return $this->getData('url');
89  }
90 
94  public function setUrl($url)
95  {
96  $this->setData('url', $url);
97  }
98 
102  public function getId()
103  {
104  return $this->getData('id');
105  }
106 
110  public function setId($id)
111  {
112  $this->setData('id', $id);
113  }
114 
118  public function getName()
119  {
120  return $this->getData('name');
121  }
122 
126  public function setName($name)
127  {
128  $this->setData('name', $name);
129  }
130 
134  public function setType($productType)
135  {
136  $this->setData('type', $productType);
137  }
138 
142  public function getType()
143  {
144  return $this->getData("type");
145  }
146 
150  public function getIsSalable()
151  {
152  return $this->getData("is_salable");
153  }
154 
158  public function setIsSalable($isSalable)
159  {
160  $this->setData('is_salable', $isSalable);
161  }
162 
166  public function setStoreId($storeId)
167  {
168  $this->setData('store_id', $storeId);
169  }
170 
174  public function getStoreId()
175  {
176  return $this->getData('store_id');
177  }
178 
182  public function getCurrencyCode()
183  {
184  return $this->getData('currency_code');
185  }
186 
190  public function setCurrencyCode($currencyCode)
191  {
192  $this->setData('currency_code', $currencyCode);
193  }
194 
200  public function getExtensionAttributes()
201  {
202  return $this->getData(self::EXTENSION_ATTRIBUTES_KEY);
203  }
204 
211  public function setExtensionAttributes(
212  \Magento\Catalog\Api\Data\ProductRenderExtensionInterface $extensionAttributes
213  ) {
214  $this->_setExtensionAttributes($extensionAttributes);
215  }
216 }
$id
Definition: fieldset.phtml:14
setPriceInfo(PriceInfoInterface $priceInfo)
_setExtensionAttributes(\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes)
setAddToCartButton(ButtonInterface $addToCartButton)
setAddToCompareButton(ButtonInterface $compareButton)
setExtensionAttributes(\Magento\Catalog\Api\Data\ProductRenderExtensionInterface $extensionAttributes)
if(!isset($_GET['name'])) $name
Definition: log.php:14