Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (CollectionFactory $productCollectionFactory, ProductRepositoryInterface $productRepository, StoreManagerInterface $storeManager, SwatchCollectionFactory $swatchCollectionFactory, UrlBuilder $urlBuilder, Json $serializer=null, SwatchAttributesProvider $swatchAttributesProvider=null, SwatchAttributeType $swatchTypeChecker=null) | |
assembleAdditionalDataEavAttribute (Attribute $attribute) | |
loadFirstVariationWithSwatchImage (Product $configurableProduct, array $requiredAttributes) | |
loadFirstVariationWithImage (Product $configurableProduct, array $requiredAttributes) | |
loadVariationByFallback (Product $parentProduct, array $attributes) | |
getProductMediaGallery (ModelProduct $product) | |
getSwatchAttributesAsArray (Product $product) | |
isProductHasSwatch (Product $product) | |
isSwatchAttribute (Attribute $attribute) | |
isVisualSwatch (Attribute $attribute) | |
isTextSwatch (Attribute $attribute) | |
Data Fields | |
const | EMPTY_IMAGE_VALUE = 'no_selection' |
const | DEFAULT_STORE_ID = 0 |
Protected Member Functions | |
getMetadataPool () | |
Protected Attributes | |
$productCollectionFactory | |
$productRepository | |
$storeManager | |
$swatchCollectionFactory | |
$eavAttributeAdditionalDataKeys | |
@SuppressWarnings(PHPMD.CouplingBetweenObjects)
__construct | ( | CollectionFactory | $productCollectionFactory, |
ProductRepositoryInterface | $productRepository, | ||
StoreManagerInterface | $storeManager, | ||
SwatchCollectionFactory | $swatchCollectionFactory, | ||
UrlBuilder | $urlBuilder, | ||
Json | $serializer = null , |
||
SwatchAttributesProvider | $swatchAttributesProvider = null , |
||
SwatchAttributeType | $swatchTypeChecker = null |
||
) |
CollectionFactory | $productCollectionFactory | |
ProductRepositoryInterface | $productRepository | |
StoreManagerInterface | $storeManager | |
SwatchCollectionFactory | $swatchCollectionFactory | |
UrlBuilder | $urlBuilder | |
Json | null | $serializer | |
SwatchAttributesProvider | $swatchAttributesProvider | |
SwatchAttributeType | null | $swatchTypeChecker |
Definition at line 112 of file Data.php.
assembleAdditionalDataEavAttribute | ( | Attribute | $attribute | ) |
|
protected |
getProductMediaGallery | ( | ModelProduct | $product | ) |
Method getting full media gallery for current Product Array structure: [ ['image'] => 'http://url/pub/media/catalog/product/2/0/blabla.jpg', ['mediaGallery'] => [ galleryImageId1 => simpleProductImage1.jpg, galleryImageId2 => simpleProductImage2.jpg, ..., ] ]
ModelProduct | $product |
Definition at line 313 of file Data.php.
getSwatchAttributesAsArray | ( | Product | $product | ) |
isProductHasSwatch | ( | Product | $product | ) |
isSwatchAttribute | ( | Attribute | $attribute | ) |
isTextSwatch | ( | Attribute | $attribute | ) |
isVisualSwatch | ( | Attribute | $attribute | ) |
loadFirstVariationWithImage | ( | Product | $configurableProduct, |
array | $requiredAttributes | ||
) |
loadFirstVariationWithSwatchImage | ( | Product | $configurableProduct, |
array | $requiredAttributes | ||
) |
loadVariationByFallback | ( | Product | $parentProduct, |
array | $attributes | ||
) |
Load Variation Product using fallback
Product | $parentProduct | |
array | $attributes |
Definition at line 233 of file Data.php.
|
protected |
const EMPTY_IMAGE_VALUE = 'no_selection' |