public function getInputType() { if ($this->getAttribute() === 'type_id') { return 'multiselect'; } return parent::getInputType(); }
/** * Input type for the current attribute. * * @return string */ public function getInputType() { $specialAttributes = array('in_stock', 'has_image', 'has_discount', 'is_new'); if (in_array($this->getAttribute(), $specialAttributes)) { return 'select'; } return parent::getInputType(); }