public function __construct($name, $title = null, $value = null) { $this->labelField = LabelField::create($name . "Label", self::name_to_label($name))->addExtraClass("left"); $this->checkboxField = CheckboxField::create($name, "", $value); $this->labelField->setTemplate("LabeledCheckboxLabelField"); $this->addExtraClass("field"); parent::__construct(array($this->labelField, $this->checkboxField)); }