Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog
Model
Product
Gallery
ImagesConfigFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Catalog\Model\Product\Gallery
;
7
8
use Magento\Framework\Data\CollectionFactory;
9
use
Magento\Framework\DataObject
;
10
11
class
ImagesConfigFactory
implements
ImagesConfigFactoryInterface
12
{
16
private
$dataCollectionFactory;
17
21
public
function
__construct
(CollectionFactory $dataCollectionFactory)
22
{
23
$this->dataCollectionFactory = $dataCollectionFactory;
24
}
25
29
public
function
create
(array $imagesConfig, array
$data
= [])
30
{
32
$collection
= $this->dataCollectionFactory->create(
$data
);
33
array_map(
function
($imageConfig) use (
$collection
) {
34
$collection
->addItem(
new
DataObject
($imageConfig));
35
}, $imagesConfig);
36
37
return
$collection
;
38
}
39
}
Magento\Catalog\Model\Product\Gallery\ImagesConfigFactoryInterface
Definition:
ImagesConfigFactoryInterface.php:8
Magento\Framework\DataObject
Definition:
DataObject.php:15
Magento\Catalog\Model\Product\Gallery\ImagesConfigFactory\__construct
__construct(CollectionFactory $dataCollectionFactory)
Definition:
ImagesConfigFactory.php:21
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Catalog\Model\Product\Gallery\ImagesConfigFactoryInterface\create
create(array $imagesConfig, array $data=[])
Magento\Catalog\Model\Product\Gallery
Definition:
CreateHandlerTest.php:7
$collection
$collection
Definition:
catalog_category_with_apostrophe_rollback.php:17
Magento\Catalog\Model\Product\Gallery\ImagesConfigFactory
Definition:
ImagesConfigFactory.php:11
Magento\Framework\DataObject
Definition:
Cache.php:6