SimpleForm::setWidget PHP Method

setWidget() protected method

Sets the widget into the form, grouping radio buttons if any.
protected setWidget ( SimpleWidget $tag )
$tag SimpleWidget Incoming form control.
    protected function setWidget($tag)
    {
        if (strtolower($tag->getAttribute('type')) === 'radio') {
            $this->addRadioButton($tag);
        } elseif (strtolower($tag->getAttribute('type')) === 'checkbox') {
            $this->addCheckbox($tag);
        } else {
            $this->widgets[] = $tag;
        }
    }