PHP Class Contao\FormCheckBox

Inheritance: extends Widget
Afficher le fichier Open project: contao/core-bundle

Protected Properties

Свойство Type Description
$blnSubmitInput boolean Submit user input
$strError string Error message
$strPrefix string The CSS class prefix
$strTemplate string Template

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
getOptions ( ) : array Generate the options

Method Details

__get() public méthode

Return a parameter
public __get ( string $strKey ) : mixed
$strKey string The parameter key
Résultat mixed The parameter value

__set() public méthode

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

generate() public méthode

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

generateWithError() public méthode

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
Résultat string The form field markup

getAttributes() public méthode

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

getOptions() protected méthode

Generate the options
protected getOptions ( ) : array
Résultat array The options array

validate() public méthode

Check the options if the field is mandatory
public validate ( )

Property Details

$blnSubmitInput protected_oe property

Submit user input
protected bool $blnSubmitInput
Résultat boolean

$strError protected_oe property

Error message
protected string $strError
Résultat string

$strPrefix protected_oe property

The CSS class prefix
protected string $strPrefix
Résultat string

$strTemplate protected_oe property

Template
protected string $strTemplate
Résultat string