PHP Class Contao\FormCheckBox

Inheritance: extends Widget
Datei anzeigen 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)
getAttributes ( array $arrStrip = [] ) : string Return all attributes as string
validate ( ) Check the options if the field is mandatory

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 key
return mixed The parameter value

__set() public method

Add specific attributes
public __set ( string $strKey, mixed $varValue )
$strKey string The attribute name
$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

getAttributes() public method

Return all attributes as string
public getAttributes ( array $arrStrip = [] ) : string
$arrStrip array An optional array with attributes to strip
return string The attributes string

getOptions() protected method

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

validate() public method

Check the options if the field is mandatory
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