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
Attribute
AttributeSetFinder.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Catalog\Model\Product\Attribute
;
7
8
use
Magento\Catalog\Api\Data\ProductInterface
;
9
use
Magento\Catalog\Model\ResourceModel\Product\Collection
;
10
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
11
use
Magento\Catalog\Api\AttributeSetFinderInterface
;
12
use
Magento\Framework\DB\Select
;
13
14
class
AttributeSetFinder
implements
AttributeSetFinderInterface
15
{
19
private
$productCollectionFactory;
20
24
public
function
__construct
(CollectionFactory $productCollectionFactory)
25
{
26
$this->productCollectionFactory = $productCollectionFactory;
27
}
28
32
public
function
findAttributeSetIdsByProductIds
(array
$productIds
)
33
{
35
$collection
= $this->productCollectionFactory->create();
36
$select
=
$collection
37
->getSelect()
38
->reset(
Select::COLUMNS
)
39
->columns(
ProductInterface::ATTRIBUTE_SET_ID
)
40
->where(
'entity_id IN (?)'
,
$productIds
)
41
->group(
ProductInterface::ATTRIBUTE_SET_ID
);
42
$result
=
$collection
->getConnection()->fetchCol(
$select
);
43
return
$result
;
44
}
45
}
Magento\Catalog\Model\ResourceModel\Product\Collection
Definition:
ProductLimitation.php:6
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Catalog\Api\AttributeSetFinderInterface
Definition:
AttributeSetFinderInterface.php:14
Magento\Catalog\Api\Data\ProductInterface\ATTRIBUTE_SET_ID
const ATTRIBUTE_SET_ID
Definition:
ProductInterface.php:31
Magento\Catalog\Api\AttributeSetFinderInterface\findAttributeSetIdsByProductIds
findAttributeSetIdsByProductIds(array $productIds)
$select
$select
Definition:
catalog_rule_10_off_not_logged_rollback.php:14
Zend_Db_Select\COLUMNS
const COLUMNS
Definition:
Select.php:48
Magento\Catalog\Model\Product\Attribute\AttributeSetFinder\__construct
__construct(CollectionFactory $productCollectionFactory)
Definition:
AttributeSetFinder.php:24
Magento\Catalog\Model\Product\Attribute\AttributeSetFinder
Definition:
AttributeSetFinder.php:14
Magento\Framework\DB\Select
Definition:
ColumnsRenderer.php:6
$productIds
$productIds
Definition:
product_with_multiple_options.php:11
Magento\Catalog\Api\Data\ProductInterface
Definition:
ProductInterface.php:14
$collection
$collection
Definition:
catalog_category_with_apostrophe_rollback.php:17
Magento\Catalog\Model\Product\Attribute