Controller_MVCForm::getFieldType PHP Метод

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

Redefine this method to add special handling of your own fields.
public getFieldType ( Field $field ) : string
$field Field
Результат string
    public function getFieldType($field)
    {
        // default form field type
        $type = 'Line';
        // try to find associated form field type
        if (isset($this->type_associations[$field->type()])) {
            $type = $this->type_associations[$field->type()];
        }
        if ($field instanceof Field_Reference) {
            $type = 'DropDown';
        }
        // if form field type explicitly set in model
        if ($field->display()) {
            $tmp = $field->display();
            if (is_array($tmp)) {
                $tmp = $tmp['form'];
            }
            if ($tmp) {
                $type = $tmp;
            }
        }
        return $type;
    }