public static function quickBuild($name, array $refData, $value = null, $cssClass = null) { $field = new ToppaHtmlFormField($name, $refData, $value, $cssClass); if ($value) { $field->setValue($value); } if ($cssClass) { $field->setCssClass($cssClass); } return $field->build(); }
public function testBuildRadioInput() { $toppaHtmlFormField = new ToppaHtmlFormField('include_in_random', $this->refData['include_in_random']); $this->assertEqual('<input type="radio" name="include_in_random" id="include_in_random" value="Y" /> Yes' . PHP_EOL . '<input type="radio" name="include_in_random" id="include_in_random" value="N" /> No' . PHP_EOL, $toppaHtmlFormField->build()); }