Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AttributeSetFinder.php
Go to the documentation of this file.
1 <?php
7 
10 use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
13 
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();
37  ->getSelect()
38  ->reset(Select::COLUMNS)
40  ->where('entity_id IN (?)', $productIds)
42  $result = $collection->getConnection()->fetchCol($select);
43  return $result;
44  }
45 }
const COLUMNS
Definition: Select.php:48
__construct(CollectionFactory $productCollectionFactory)