/** * Retrieve list of product attribute sets with search part contained in label * * @param string $labelPart * @return array */ public function getSuggestedSets($labelPart) { $labelPart = $this->resourceHelper->addLikeEscape($labelPart, ['position' => 'any']); /** @var \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $collection */ $collection = $this->attributeSetCollectionFactory->create(); $collection->setEntityTypeFilter($this->product->getTypeId())->addFieldToFilter('attribute_set_name', ['like' => $labelPart])->addFieldToSelect('attribute_set_id', 'id')->addFieldToSelect('attribute_set_name', 'label')->setOrder('attribute_set_name', \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection::SORT_ORDER_ASC); return $collection->getData(); }
/** * {@inheritdoc} */ public function getTypeId() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTypeId'); if (!$pluginInfo) { return parent::getTypeId(); } else { return $this->___callPlugins('getTypeId', func_get_args(), $pluginInfo); } }