33 $this->_resourceHelper = $resourceHelper;
42 public function getSuggestedAttributes($labelPart)
44 $escapedLabelPart = $this->_resourceHelper->addLikeEscape($labelPart, [
'position' =>
'any']);
46 $collection = $this->configurableAttributeHandler->getApplicableAttributes()->addFieldToFilter(
48 [
'like' => $escapedLabelPart]
53 if ($this->configurableAttributeHandler->isAttributeApplicable(
$attribute)) {
58 'options' =>
$attribute->getSource()->getAllOptions(
false),
$configurableAttributeHandler
__construct(\Magento\ConfigurableProduct\Model\ConfigurableAttributeHandler $configurableAttributeHandler, \Magento\Catalog\Model\ResourceModel\Helper $resourceHelper)