original_string: public function addField($label, $value, $checked = false, $meta = array())
      {
          $name = $this->getName();
  
          $objField = new GroupField($this->getRandomId($name), $name, $this->__type, $label, $value, $checked, $meta);
          $objField->setMeta("parent", $this, true);
  
          $this->__fields->addObject($objField);
  
          // *** Set the default value if "checked" is set.
  		if ($checked) {
  		    switch ($this->__type) {
  		        case ValidForm::VFORM_CHECK_LIST:
  		            $arrDefault = (is_array($this->__default)) ? $this->__default : array($this->__default);
  		            $arrDefault[] = $value;
  
  		            $this->__default = $arrDefault;
  
  		            break;
  		        default:
  		            $this->__default = $value;
  		    }
  		}
  
          return $objField;
      }
code: public function addField($label, $value, $checked = false, $meta = array())
      {
          $name = $this->getName();
  
          $objField = new GroupField($this->getRandomId($name), $name, $this->__type, $label, $value, $checked, $meta);
          $objField->setMeta("parent", $this, true);
  
          $this->__fields->addObject($objField);
  
          // *** Set the default value if "checked" is set.
  		if ($checked) {
  		    switch ($this->__type) {
  		        case ValidForm::VFORM_CHECK_LIST:
  		            $arrDefault = (is_array($this->__default)) ? $this->__default : array($this->__default);
  		            $arrDefault[] = $value;
  
  		            $this->__default = $arrDefault;
  
  		            break;
  		        default:
  		            $this->__default = $value;
  		    }
  		}
  
          return $objField;
      }
code_tokens: public function addField ( $ label , $ value , $ checked = false , $ meta = array ( ) ) { $ name = $ this -> getName ( ) ; $ objField = new GroupField ( $ this -> getRandomId ( $ name ) , $ name , $ this -> __type , $ label , $ value , $ checked , $ meta ) ; $ objField -> setMeta ( "parent" , $ this , true ) ; $ this -> __fields -> addObject ( $ objField ) ; // *** Set the default value if "checked" is set. if ( $ checked ) { switch ( $ this -> __type ) { case ValidForm :: VFORM_CHECK_LIST : $ arrDefault = ( is_array ( $ this -> __default ) ) ? $ this -> __default : array ( $ this -> __default ) ; $ arrDefault [ ] = $ value ; $ this -> __default = $ arrDefault ; break ; default : $ this -> __default = $ value ; } } return $ objField ; }
docstring: Add either a radio button or checkbox to the group
  
  @param string $label The label
  @param string $value The value
  @param boolean $checked Set to true if this item should be checked / selected by default
  @param array $meta The meta array
  
  @return \ValidFormBuilder\GroupField
docstring_tokens: Add either a radio button or checkbox to the group