public function run()
    {
        if ($this->hide) {
            return '';
        }

        switch ($this->type) {
            case self::FIELD_TYPE_TEXT: {
                $instance = $this->getInstance(FieldTypeText::class);
                break;
            }

            case self::FIELD_TYPE_TEXT_AREA: {
                $instance = $this->getInstance(FieldTypeTextArea::class);
                break;
            }

            case self::FIELD_TYPE_CKEDITOR: {
                $instance = $this->getInstance(FieldTypeCKEditor::class);
                break;
            }

            case self::FIELD_TYPE_CKEDITOR_ADMIN: {
                $instance = $this->getInstance(FieldTypeCKEditorAdmin::class);
                break;
            }

            case self::FIELD_TYPE_FILE: {
                $instance = $this->getInstance(FieldTypeFile::class);
                break;
            }

            case self::FIELD_TYPE_DROPDOWN: {
                $instance = $this->getInstance(FieldTypeDropdown::class);
                break;
            }

            case self::FIELD_TYPE_CHECKBOX: {
                $instance = $this->getInstance(FieldTypeCheckbox::class);
                break;
            }

            case self::FIELD_TYPE_PASSWORD: {
                $instance = $this->getInstance(FieldTypePassword::class);
                break;
            }

            default: {
                throw new InvalidConfigException('Unknown type of field');
            }
        }

        return $instance->run();
    }
public function run()
    {
        if ($this->hide) {
            return '';
        }

        switch ($this->type) {
            case self::FIELD_TYPE_TEXT: {
                $instance = $this->getInstance(FieldTypeText::class);
                break;
            }

            case self::FIELD_TYPE_TEXT_AREA: {
                $instance = $this->getInstance(FieldTypeTextArea::class);
                break;
            }

            case self::FIELD_TYPE_CKEDITOR: {
                $instance = $this->getInstance(FieldTypeCKEditor::class);
                break;
            }

            case self::FIELD_TYPE_CKEDITOR_ADMIN: {
                $instance = $this->getInstance(FieldTypeCKEditorAdmin::class);
                break;
            }

            case self::FIELD_TYPE_FILE: {
                $instance = $this->getInstance(FieldTypeFile::class);
                break;
            }

            case self::FIELD_TYPE_DROPDOWN: {
                $instance = $this->getInstance(FieldTypeDropdown::class);
                break;
            }

            case self::FIELD_TYPE_CHECKBOX: {
                $instance = $this->getInstance(FieldTypeCheckbox::class);
                break;
            }

            case self::FIELD_TYPE_PASSWORD: {
                $instance = $this->getInstance(FieldTypePassword::class);
                break;
            }

            default: {
                throw new InvalidConfigException('Unknown type of field');
            }
        }

        return $instance->run();
    }
public function run ( ) { if ( $ this -> hide ) { return '' ; } switch ( $ this -> type ) { case self :: FIELD_TYPE_TEXT : { $ instance = $ this -> getInstance ( FieldTypeText :: class ) ; break ; } case self :: FIELD_TYPE_TEXT_AREA : { $ instance = $ this -> getInstance ( FieldTypeTextArea :: class ) ; break ; } case self :: FIELD_TYPE_CKEDITOR : { $ instance = $ this -> getInstance ( FieldTypeCKEditor :: class ) ; break ; } case self :: FIELD_TYPE_CKEDITOR_ADMIN : { $ instance = $ this -> getInstance ( FieldTypeCKEditorAdmin :: class ) ; break ; } case self :: FIELD_TYPE_FILE : { $ instance = $ this -> getInstance ( FieldTypeFile :: class ) ; break ; } case self :: FIELD_TYPE_DROPDOWN : { $ instance = $ this -> getInstance ( FieldTypeDropdown :: class ) ; break ; } case self :: FIELD_TYPE_CHECKBOX : { $ instance = $ this -> getInstance ( FieldTypeCheckbox :: class ) ; break ; } case self :: FIELD_TYPE_PASSWORD : { $ instance = $ this -> getInstance ( FieldTypePassword :: class ) ; break ; } default : { throw new InvalidConfigException ( 'Unknown type of field' ) ; } } return $ instance -> run ( ) ; }
Starts the output widget of the required form field, depending on the type of field.

@throws InvalidConfigException

@return mixed
Starts the output widget of the required form field depending on the type of field .