PHP Class Contao\FormRadioButton

Form field "radio button".
Inheritance: extends Widget
Mostra file Open project: contao/core-bundle

Protected Properties

Property Type Description
$blnSubmitInput boolean Submit user input
$strError string Error message
$strPrefix string The CSS class prefix
$strTemplate string Template

Public Methods

Method Description
__get ( string $strKey ) : mixed Return a parameter
__set ( string $strKey, mixed $varValue ) Add specific attributes
generate ( ) : string Generate the widget and return it as string
generateWithError ( boolean $blnSwitchOrder = false ) : string Override the parent method and inject the error message inside the fieldset (see #3392)
validate ( ) Check for a valid option (see #4383)

Protected Methods

Method Description
getOptions ( ) : array Generate the options

Method Details

__get() public method

Return a parameter
public __get ( string $strKey ) : mixed
$strKey string The parameter name
return mixed The parameter value

__set() public method

Add specific attributes
public __set ( string $strKey, mixed $varValue )
$strKey string The attribute key
$varValue mixed The attribute value

generate() public method

Generate the widget and return it as string
public generate ( ) : string
return string The widget markup

generateWithError() public method

Override the parent method and inject the error message inside the fieldset (see #3392)
public generateWithError ( boolean $blnSwitchOrder = false ) : string
$blnSwitchOrder boolean If true, the error message will be shown below the field
return string The form field markup

getOptions() protected method

Generate the options
protected getOptions ( ) : array
return array The options array

validate() public method

Check for a valid option (see #4383)
public validate ( )

Property Details

$blnSubmitInput protected_oe property

Submit user input
protected bool $blnSubmitInput
return boolean

$strError protected_oe property

Error message
protected string $strError
return string

$strPrefix protected_oe property

The CSS class prefix
protected string $strPrefix
return string

$strTemplate protected_oe property

Template
protected string $strTemplate
return string