TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
SelectSingleBoxElement Class Reference
Inheritance diagram for SelectSingleBoxElement:
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

 renderSelectElement (array $optionElements, array $parameterArray, array $config)
 
 renderOptionElement ($value, $label, array $attributes=[])
 
 renderResetButtonElement ($formElementName, array $initiallySelectedIndices)
 
 implodeAttributes (array $attributes=[])
 
- 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

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 ( 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 SelectSingleBoxElement\renderOptionElement(), SelectSingleBoxElement\renderResetButtonElement(), and SelectSingleBoxElement\renderSelectElement().

render ( )
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 SelectSingleBoxElement\implodeAttributes().

Referenced by SelectSingleBoxElement\render().

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 AbstractFormElement\getLanguageService(), SelectSingleBoxElement\implodeAttributes(), GeneralUtility\quoteJSvalue(), and Icon\SIZE_SMALL.

Referenced by SelectSingleBoxElement\render().

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 MathUtility\forceIntegerInRange(), StringUtility\getUniqueId(), AbstractNode\getValidationDataAsDataAttribute(), and SelectSingleBoxElement\implodeAttributes().

Referenced by SelectSingleBoxElement\render().