ProductAttributeType::getDropDownField PHP Метод

getDropDownField() публичный Метод

Returns a dropdown field for the user to select a variant.
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;
    }