TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
CheckboxElement Class Reference
Inheritance diagram for CheckboxElement:
AbstractFormElement AbstractNode NodeInterface

Public Member Functions

 render ()
 
- Public Member Functions inherited from AbstractFormElement
 __construct (NodeFactory $nodeFactory, array $data)
 
- Public Member Functions inherited from AbstractNode
 __construct (NodeFactory $nodeFactory, array $data)
 
 render ()
 

Protected Member Functions

 renderSingleCheckboxElement ($label, $itemCounter, $formElementValue, $numberOfItems, $additionalInformation, $disabled)
 
 checkBoxParams ($itemName, $formElementValue, $checkbox, $checkboxesCount, $additionalJavaScript= '')
 
- Protected Member Functions inherited from AbstractFormElement
 isWizardsDisabled ()
 
 formMaxWidth ($size=48)
 
 getClipboardElements ($allowed, $mode)
 
 getLanguageService ()
 
- Protected Member Functions inherited from AbstractNode
 initializeResultArray ()
 
 mergeChildReturnIntoExistingResult (array $existing, array $childReturn)
 
 getValidationDataAsDataAttribute (array $config)
 
 getValidationDataAsJsonString (array $config)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractFormElement
 $defaultInputWidth = 30
 
 $minimumInputWidth = 10
 
 $maxInputWidth = 50
 
 $clipboard = null
 
 $iconFactory
 

Detailed Description

Generation of TCEform elements of the type "check"

Definition at line 22 of file CheckboxElement.php.

Member Function Documentation

checkBoxParams (   $itemName,
  $formElementValue,
  $checkbox,
  $checkboxesCount,
  $additionalJavaScript = '' 
)
protected

Creates checkbox parameters

Parameters
string$itemNameForm element name
int$formElementValueThe value of the checkbox (representing checkboxes with the bits)
int$checkboxCheckbox # (0-9?)
int$checkboxesCountTotal number of checkboxes in the array.
string$additionalJavaScriptAdditional JavaScript for the onclick handler.
Returns
string The onclick attribute + possibly the checked-option set.

Definition at line 157 of file CheckboxElement.php.

Referenced by CheckboxElement\renderSingleCheckboxElement().

render ( )

This will render a checkbox or an array of checkboxes

Returns
array As defined in initializeResultArray() of AbstractNode

Implements NodeInterface.

Definition at line 29 of file CheckboxElement.php.

References elseif, AbstractNode\initializeResultArray(), and CheckboxElement\renderSingleCheckboxElement().

renderSingleCheckboxElement (   $label,
  $itemCounter,
  $formElementValue,
  $numberOfItems,
  $additionalInformation,
  $disabled 
)
protected

This functions builds the HTML output for the checkbox

Parameters
string$labelLabel of this item
int$itemCounterNumber of this element in the list of all elements
int$formElementValueValue of this element
int$numberOfItemsFull number of items
array$additionalInformationInformation with additional configuration options.
bool$disabledTRUE if form element is disabled
Returns
string Single element HTML

Definition at line 120 of file CheckboxElement.php.

References CheckboxElement\checkBoxParams().

Referenced by CheckboxElement\render().