store = $store; $this->entityType = $entityType; } public function toOptionArray() { $types = ['text', 'multiselect', 'decimal']; $attributes = $this->entityType->loadByCode('catalog_product')->getAttributeCollection(); $attributes->addFieldToFilter('frontend_input', $types); $result = []; foreach ($attributes as $attr) { if ($attr->getFrontendLabel()) { $result[] = [ 'value' => $attr->getAttributeId(), 'label' => $attr->getFrontendLabel(), 'title' => $attr->getAttributeCode() ]; } } return $result; } }