public function getValueElementType() { if ($this->getAttribute() === 'type_id') { return 'multiselect'; } return parent::getValueElementType(); }
/** * Input type for the current attribute. * * @return string */ public function getValueElementType() { $specialAttributes = array('in_stock', 'has_image', 'has_discount', 'is_new'); if (in_array($this->getAttribute(), $specialAttributes)) { return 'select'; } return parent::getValueElementType(); }
public function getValueElementType() { $attributeName = array('is_new' => 'Is new', 'is_special' => 'Is special', 'out_of_stock' => 'Is Out Of Stock'); if ($this->getAttribute() == 'qty') { return 'text'; } elseif (!array_key_exists($this->getAttribute(), $attributeName)) { return parent::getValueElementType(); } return 'select'; }