TYPO3 CMS  TYPO3_6-2
RadioGroupJsonElement.php
Go to the documentation of this file.
1 <?php
3 
23 
29  public $xtype = 'typo3-form-wizard-elements-predefined-radiogroup';
30 
36  public $configuration = array(
37  'attributes' => array(),
38  'legend' => array(
39  'value' => ''
40  ),
41  'options' => array(),
42  'various' => array(
43  'name' => ''
44  ),
45  'validation' => array()
46  );
47 
53  protected $allowedAttributes = array(
54  'class',
55  'dir',
56  'id',
57  'lang',
58  'style'
59  );
60 
68  public function setParameters(array $parameters) {
69  parent::setParameters($parameters);
70  $this->setOptions($parameters);
71  $this->setVarious($parameters);
72  }
73 
80  protected function setOptions(array $parameters) {
81  if (is_array($parameters)) {
83  foreach ($keys as $key) {
84  $class = $parameters[$key];
85  if ((int)$key && strpos($key, '.') === FALSE) {
86  if (isset($parameters[$key . '.']) && $class === 'RADIO') {
87  $childElementArguments = $parameters[$key . '.'];
88  if (isset($childElementArguments['checked'])) {
89  $childElementArguments['attributes']['selected'] = 'selected';
90  unset($childElementArguments['checked']);
91  }
92  if (isset($childElementArguments['label.'])) {
93  $childElementArguments['data'] = $childElementArguments['label.']['value'];
94  unset($childElementArguments['label.']);
95  }
96  $this->configuration['options'][] = $childElementArguments;
97  }
98  }
99  }
100  }
101  }
102 
109  protected function setVarious(array $parameters) {
110  if (isset($parameters['name'])) {
111  $this->configuration['various']['name'] = $parameters['name'];
112  }
113  }
114 
115 }
$parameters
Definition: FileDumpEID.php:15
static sortedKeyList($setupArr, $acceptOnlyProperties=FALSE)