Example #1
0
 /**
  * Initialize attribute sets code-to-id pairs.
  *
  * @return $this
  */
 protected function _initAttributeSets()
 {
     $productTypeId = $this->_productFactory->create()->getTypeId();
     foreach ($this->_attrSetColFactory->create()->setEntityTypeFilter($productTypeId) as $attributeSet) {
         $this->_attrSetIdToName[$attributeSet->getId()] = $attributeSet->getAttributeSetName();
     }
     return $this;
 }