public static function Factory($name, $valueList, $label = '', $required = false, $selected = array(), $attrList = array()) { $element = new SelectBox($name); $element->setValue($valueList); $element->setLabel($label); $element->setRequired($required); $element->setOptionList($attrList); $element->setSelectedValueList($selected); return $element; }