FML/Script/Features/RadioButtonGroupFeature.php
protected function prepareOnRadioButtonClickFunction(Script $script)
    {
        $script->addScriptFunction(self::FUNCTION_ON_RADIO_BUTTON_CLICK, "
Void " . self::FUNCTION_ON_RADIO_BUTTON_CLICK . "(CMlQuad _RadioButtonQuad, CMlEntry _RadioButtonGroupEntry, Text[Text] _RadioButtonIds) {
    // update group entry with name of selected radio button
	declare " . CheckBoxFeature::VAR_CHECKBOX_ENABLED . " as RadioButtonEnabled for _RadioButtonQuad = False;
	if (_RadioButtonGroupEntry != Null) {
	    declare RadioButtonGroupValue = \"\";
	    if (RadioButtonEnabled && _RadioButtonIds.exists(_RadioButtonQuad.ControlId)) {
	        RadioButtonGroupValue = _RadioButtonIds.keyof(_RadioButtonQuad.ControlId);
	    }
        _RadioButtonGroupEntry.Value = RadioButtonGroupValue;
	}
	// disable other radio buttons
	if (RadioButtonEnabled) {
        foreach (OtherRadioButtonId in _RadioButtonIds) {
            declare OtherRadioButtonQuad <=> (Page.GetFirstChild(OtherRadioButtonId) as CMlQuad);
            if (OtherRadioButtonQuad != Null && OtherRadioButtonQuad != _RadioButtonQuad) {
                declare " . CheckBoxFeature::VAR_CHECKBOX_ENABLED . " as OtherRadioButtonEnabled for OtherRadioButtonQuad = False;
                if (OtherRadioButtonEnabled) {
                    " . CheckBoxFeature::FUNCTION_UPDATE_QUAD_DESIGN . "(OtherRadioButtonQuad);
                }
            }
        }
	}
}");
        return $this;
    }
protected function prepareOnRadioButtonClickFunction(Script $script)
    {
        $script->addScriptFunction(self::FUNCTION_ON_RADIO_BUTTON_CLICK, "
Void " . self::FUNCTION_ON_RADIO_BUTTON_CLICK . "(CMlQuad _RadioButtonQuad, CMlEntry _RadioButtonGroupEntry, Text[Text] _RadioButtonIds) {
    // update group entry with name of selected radio button
	declare " . CheckBoxFeature::VAR_CHECKBOX_ENABLED . " as RadioButtonEnabled for _RadioButtonQuad = False;
	if (_RadioButtonGroupEntry != Null) {
	    declare RadioButtonGroupValue = \"\";
	    if (RadioButtonEnabled && _RadioButtonIds.exists(_RadioButtonQuad.ControlId)) {
	        RadioButtonGroupValue = _RadioButtonIds.keyof(_RadioButtonQuad.ControlId);
	    }
        _RadioButtonGroupEntry.Value = RadioButtonGroupValue;
	}
	// disable other radio buttons
	if (RadioButtonEnabled) {
        foreach (OtherRadioButtonId in _RadioButtonIds) {
            declare OtherRadioButtonQuad <=> (Page.GetFirstChild(OtherRadioButtonId) as CMlQuad);
            if (OtherRadioButtonQuad != Null && OtherRadioButtonQuad != _RadioButtonQuad) {
                declare " . CheckBoxFeature::VAR_CHECKBOX_ENABLED . " as OtherRadioButtonEnabled for OtherRadioButtonQuad = False;
                if (OtherRadioButtonEnabled) {
                    " . CheckBoxFeature::FUNCTION_UPDATE_QUAD_DESIGN . "(OtherRadioButtonQuad);
                }
            }
        }
	}
}");
        return $this;
    }
protected function prepareOnRadioButtonClickFunction ( Script $ script ) { $ script -> addScriptFunction ( self :: FUNCTION_ON_RADIO_BUTTON_CLICK , "
Void " . self :: FUNCTION_ON_RADIO_BUTTON_CLICK . "(CMlQuad _RadioButtonQuad, CMlEntry _RadioButtonGroupEntry, Text[Text] _RadioButtonIds) {
    // update group entry with name of selected radio button
	declare " . CheckBoxFeature :: VAR_CHECKBOX_ENABLED . " as RadioButtonEnabled for _RadioButtonQuad = False;
	if (_RadioButtonGroupEntry != Null) {
	    declare RadioButtonGroupValue = \"\";
	    if (RadioButtonEnabled && _RadioButtonIds.exists(_RadioButtonQuad.ControlId)) {
	        RadioButtonGroupValue = _RadioButtonIds.keyof(_RadioButtonQuad.ControlId);
	    }
        _RadioButtonGroupEntry.Value = RadioButtonGroupValue;
	}
	// disable other radio buttons
	if (RadioButtonEnabled) {
        foreach (OtherRadioButtonId in _RadioButtonIds) {
            declare OtherRadioButtonQuad <=> (Page.GetFirstChild(OtherRadioButtonId) as CMlQuad);
            if (OtherRadioButtonQuad != Null && OtherRadioButtonQuad != _RadioButtonQuad) {
                declare " . CheckBoxFeature :: VAR_CHECKBOX_ENABLED . " as OtherRadioButtonEnabled for OtherRadioButtonQuad = False;
                if (OtherRadioButtonEnabled) {
                    " . CheckBoxFeature :: FUNCTION_UPDATE_QUAD_DESIGN . "(OtherRadioButtonQuad);
                }
            }
        }
	}
}" ) ; return $ this ; }
Build the RadioButton click handler function

@param Script $script Script
@return static
Build the RadioButton click handler function