Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ProductLimitation.php
Go to the documentation of this file.
1 <?php
7 
14 class ProductLimitation implements \ArrayAccess
15 {
31  private $productLimitationFilters = [];
32 
38  public function offsetExists($offset)
39  {
40  return array_key_exists($offset, $this->productLimitationFilters);
41  }
42 
48  public function offsetGet($offset)
49  {
50  return $this->productLimitationFilters[$offset];
51  }
52 
59  public function offsetSet($offset, $value)
60  {
61  $this->productLimitationFilters[$offset] = $value;
62  }
63 
69  public function offsetUnset($offset)
70  {
71  unset($this->productLimitationFilters[$offset]);
72  }
73 
78  public function getStoreId()
79  {
80  return $this->offsetGet('store_id');
81  }
82 
87  public function getCategoryId()
88  {
89  return $this->offsetGet('category_id');
90  }
91 
96  public function getCategoryIsAnchor()
97  {
98  return $this->offsetGet('category_is_anchor');
99  }
100 
105  public function getVisibility()
106  {
107  return $this->offsetGet('visibility');
108  }
109 
114  public function getWebsiteIds()
115  {
116  return $this->offsetGet('website_ids');
117  }
118 
123  public function getStoreTable()
124  {
125  return $this->offsetGet('store_table');
126  }
127 
134  public function isUsingPriceIndex()
135  {
136  return $this->offsetExists('use_price_index') ? (bool)$this->offsetGet('use_price_index') : false;
137  }
138 
144  public function setUsePriceIndex($value)
145  {
146  $this->offsetSet('use_price_index', (bool)$value);
147  }
148 
155  public function getCustomerGroupId()
156  {
157  return $this->offsetGet('customer_group_id');
158  }
159 
166  public function getWebsiteId()
167  {
168  return $this->offsetGet('website_id');
169  }
170 }
$value
Definition: gender.phtml:16