Detailed Description

ValueListProvider provides lists of key/values to be used with list input controls.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 23 of file ValueListProvider.php.

Static Public Member Functions

static getList ($definition, $language=null)
 
static translateValue ($value, $inputType, $language=null)
 

Static Protected Member Functions

static getListStrategy ($listType)
 

Member Function Documentation

static getList (   $definition,
  $language = null 
)
static

Get a list of key/value pairs defined by the given configuration.

Parameters
$definitionThe list definition as given in the input_type definition in the 'list' parameter (e.g. '{"type":"config","section":"EntityStage"}')
$languageThe language if the values should be localized. Optional, default is Localization::getDefaultLanguage()
Returns
An assoziative array with keys 'items' (array containing the key/value pairs) and 'isStatic'

Definition at line 39 of file ValueListProvider.php.

static translateValue (   $value,
  $inputType,
  $language = null 
)
static

Translate a value with use of it's assoziated input type e.g get the location string from a location id.

(this is only done when the input type has a list definition).

Parameters
$valueThe value to translate (maybe comma separated list for list controls)
$inputTypeThe description of the control as given in the 'input_type' property of a value
$languageThe language if the value should be localized. Optional, default is Localization::getDefaultLanguage()
Returns
The translated value

Definition at line 78 of file ValueListProvider.php.

static getListStrategy (   $listType)
staticprotected

Get the ListStrategy instance for a given list type.

Parameters
$listTypeThe list type
Returns
ListStrategy instance
Exceptions
ConfigurationException

Definition at line 117 of file ValueListProvider.php.