TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement:
TYPO3\CMS\Backend\Form\Element\AbstractFormElement TYPO3\CMS\Backend\Form\AbstractNode TYPO3\CMS\Backend\Form\NodeInterface

Public Member Functions

 render ()
 
- Public Member Functions inherited from TYPO3\CMS\Backend\Form\Element\AbstractFormElement
 __construct (NodeFactory $nodeFactory, array $data)
 
- Public Member Functions inherited from TYPO3\CMS\Backend\Form\AbstractNode
 __construct (NodeFactory $nodeFactory, array $data)
 
 render ()
 

Protected Member Functions

 renderSelectElement (array $optionElements, array $parameterArray, array $config)
 
 renderOptionElement ($value, $label, array $attributes=[])
 
 renderResetButtonElement ($formElementName, array $initiallySelectedIndices)
 
 implodeAttributes (array $attributes=[])
 
- Protected Member Functions inherited from TYPO3\CMS\Backend\Form\Element\AbstractFormElement
 isWizardsDisabled ()
 
 formMaxWidth ($size=48)
 
 getClipboardElements ($allowed, $mode)
 
 getLanguageService ()
 
- Protected Member Functions inherited from TYPO3\CMS\Backend\Form\AbstractNode
 initializeResultArray ()
 
 mergeChildReturnIntoExistingResult (array $existing, array $childReturn)
 
 getValidationDataAsDataAttribute (array $config)
 
 getValidationDataAsJsonString (array $config)
 

Additional Inherited Members

- Protected Attributes inherited from TYPO3\CMS\Backend\Form\Element\AbstractFormElement
 $defaultInputWidth = 30
 
 $minimumInputWidth = 10
 
 $maxInputWidth = 50
 
 $clipboard = null
 
 $iconFactory
 
- Protected Attributes inherited from TYPO3\CMS\Backend\Form\AbstractNode
 $data = []
 

Detailed Description

Create a widget with a select box where multiple items can be selected

This is rendered for config type=select, maxitems > 1, renderType=selectSingleBox

Definition at line 28 of file SelectSingleBoxElement.php.

Member Function Documentation

◆ implodeAttributes()

TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement::implodeAttributes ( array  $attributes = [])
protected

Build an HTML attributes string from a map of attributes

All attribute values are passed through htmlspecialchars()

Parameters
array$attributesMap of attribute names and values
Returns
string

Definition at line 229 of file SelectSingleBoxElement.php.

Referenced by TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement\renderOptionElement(), TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement\renderResetButtonElement(), and TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement\renderSelectElement().

◆ render()

◆ renderOptionElement()

TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement::renderOptionElement (   $value,
  $label,
array  $attributes = [] 
)
protected

Renders a single <option> element

Parameters
string$valueThe option value
string$labelThe option label
array$attributesMap of attribute names and values
Returns
string

Definition at line 174 of file SelectSingleBoxElement.php.

References TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement\implodeAttributes().

Referenced by TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement\render().

◆ renderResetButtonElement()

TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement::renderResetButtonElement (   $formElementName,
array  $initiallySelectedIndices 
)
protected

Renders a button for resetting to the selection on initial load

Parameters
string$formElementNameForm element name
array$initiallySelectedIndicesList of initially selected option indices
Returns
string

Definition at line 193 of file SelectSingleBoxElement.php.

References TYPO3\CMS\Backend\Form\Element\AbstractFormElement\getLanguageService(), TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement\implodeAttributes(), TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement\render().

◆ renderSelectElement()

TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement::renderSelectElement ( array  $optionElements,
array  $parameterArray,
array  $config 
)
protected

Renders a <select> element

Parameters
array$optionElementsList of rendered <option> elements
array$parameterArray
array$configField configuration
Returns
string

Definition at line 123 of file SelectSingleBoxElement.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), TYPO3\CMS\Backend\Form\AbstractNode\getValidationDataAsDataAttribute(), and TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement\implodeAttributes().

Referenced by TYPO3\CMS\Backend\Form\Element\SelectSingleBoxElement\render().