public function addField($name, FormField $field, $tab = null)
    {
        if (!$tab) {
            $tab = $this->defaultTab;
        }

        $this->fields[$tab][$name] = $field;
    }
public function addField($name, FormField $field, $tab = null)
    {
        if (!$tab) {
            $tab = $this->defaultTab;
        }

        $this->fields[$tab][$name] = $field;
    }
public function addField ( $ name , FormField $ field , $ tab = null ) { if ( ! $ tab ) { $ tab = $ this -> defaultTab ; } $ this -> fields [ $ tab ] [ $ name ] = $ field ; }
Add a field to the collection of tabs.
@param string    $name
@param FormField $field
@param string    $tab
Add a field to the collection of tabs .