Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
BaseSku.php
1<?php
2
4
23
32abstract class BaseSku extends BaseIblockElementEntity
34{
39
44
49
54
72
77 {
78 $collection = $this->getImageCollection();
79 if ($collection->isEmpty() && $this->getParent())
80 {
81 $parentCollection = $this->getParent()->getImageCollection();
82 if (!$parentCollection->isEmpty())
83 {
84 return $parentCollection;
85 }
86 }
87
88 return $collection;
89 }
90
95 {
96 if ($this->priceCollection === null)
97 {
98 // ToDo make lazy load like sku collection with iterator callback?
100 }
101
103 }
104
109 {
110 return $this->priceRepository->getCollectionByParent($this);
111 }
112
120 {
121 $priceCollection->setParent($this);
122
123 $this->priceCollection = $priceCollection;
124
125 return $this;
126 }
127
132 {
133 if ($this->measureRatioCollection === null)
134 {
136 }
137
139 }
140
145 {
146 return $this->measureRatioRepository->getCollectionByParent($this);
147 }
148
156 {
157 $measureRatioCollection->setParent($this);
158
159 $this->measureRatioCollection = $measureRatioCollection;
160
161 return $this;
162 }
163
168 {
169 if ($this->barcodeCollection === null)
170 {
172 }
173
175 }
176
181 {
182 return $this->barcodeRepository->getCollectionByParent($this);
183 }
184
192 {
193 $barcodeCollection->setParent($this);
194
195 $this->barcodeCollection = $barcodeCollection;
196
197 return $this;
198 }
199
204 {
205 if ($this->storeProductCollection === null)
206 {
208 }
209
211 }
212
217 {
218 return $this->storeProductRepository->getCollectionByParent($this);
219 }
220
228 {
229 $storeProductCollection->setParent($this);
230
231 $this->storeProductCollection = $storeProductCollection;
232
233 return $this;
234 }
235}
setStoreProductCollection(StoreProductCollection $storeProductCollection)
Definition BaseSku.php:227
setPriceCollection(PriceCollection $priceCollection)
Definition BaseSku.php:119
setBarcodeCollection(BarcodeCollection $barcodeCollection)
Definition BaseSku.php:191
setMeasureRatioCollection(MeasureRatioCollection $measureRatioCollection)
Definition BaseSku.php:155
__construct(IblockInfo $iblockInfo, SkuRepositoryContract $skuRepository, PropertyRepositoryContract $propertyRepository, ImageRepositoryContract $imageRepository, PriceRepositoryContract $priceRepository, MeasureRatioRepositoryContract $measureRatioRepository, BarcodeRepositoryContract $barcodeRepository, StoreProductRepositoryContract $storeProductRepository)
Definition BaseSku.php:55