‪TYPO3CMS  ‪main
TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper:
TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper

Public Member Functions

 initializeArguments ()
 
 render ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 getRespectSubmittedDataValue ()
 
 setRespectSubmittedDataValue (bool $respectSubmittedDataValue)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper
 injectPersistenceManager (PersistenceManagerInterface $persistenceManager)
 

Protected Attributes

string $tagName = 'input'
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
ConfigurationManagerInterface $configurationManager
 
bool $respectSubmittedDataValue = false
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper
PersistenceManagerInterface $persistenceManager
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
 getName ()
 
RequestInterface getRequest ()
 
 getNameWithoutPrefix ()
 
mixed getValueAttribute ()
 
mixed getValueFromSubmittedFormData ($value)
 
mixed convertToPlainValue ($value)
 
 hasMappingErrorOccurred ()
 
mixed getLastSubmittedFormData ()
 
 addAdditionalIdentityPropertiesIfNeeded ()
 
mixed getPropertyValue ()
 
 isObjectAccessorMode ()
 
 setErrorClassAttribute ()
 
 getMappingResultsForProperty ()
 
 renderHiddenFieldForEmptyValue ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper
 prefixFieldName (string $fieldName)
 
string renderHiddenIdentityField (?object $object, ?string $name)
 
 registerFieldNameForFormTokenGeneration (string $fieldName)
 

Detailed Description

ViewHelper which creates a simple checkbox :html:<input type="checkbox">.

Examples

Simple one

::

<f:form.checkbox name="myCheckBox" value="someValue" />

Output::

<input type="checkbox" name="myCheckBox" value="someValue" >

Preselect

::

<f:form.checkbox name="myCheckBox" value="someValue" checked="{object.value} == 5" />

Output::

<input type="checkbox" name="myCheckBox" value="someValue" checked="checked" >

Depending on bound object to surrounding :ref:f:form <typo3-fluid-form>.

Bind to object property

::

<f:form.checkbox property="interests" value="TYPO3" multiple="1" />

Output::

<input type="checkbox" name="user[interests][]" value="TYPO3" checked="checked" >

Depending on property interests.

Definition at line 63 of file CheckboxViewHelper.php.

Member Function Documentation

◆ initializeArguments()

TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper::initializeArguments ( )

◆ render()

Member Data Documentation

◆ $tagName

string TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper::$tagName = 'input'
protected

Definition at line 67 of file CheckboxViewHelper.php.