public getDropDownField ( $emptystring = null, ArrayList $values = null ) : DropdownField | ||
$values | ArrayList | |
리턴 | DropdownField |
public function getDropDownField($emptystring = null, $values = null)
{
$values = $values ? $values : $this->Values('', 'Sort ASC, Value ASC');
if ($values->exists()) {
$field = DropdownField::create('ProductAttributes[' . $this->ID . ']', $this->Name, $values->map('ID', 'Value'));
if ($emptystring) {
$field->setEmptyString($emptystring);
}
return $field;
}
return null;
}