TYPO3 CMS  TYPO3_6-2
CheckboxGroupJsonElement.php
Go to the documentation of this file.
1 <?php
3 
23 
29  public $xtype = 'typo3-form-wizard-elements-predefined-checkboxgroup';
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 
69  public function setParameters(array $parameters) {
70  parent::setParameters($parameters);
71  $this->setOptions($parameters);
72  $this->setVarious($parameters);
73  }
74 
81  protected function setOptions(array $parameters) {
82  if (is_array($parameters)) {
84  foreach ($keys as $key) {
85  $class = $parameters[$key];
86  if ((int)$key && strpos($key, '.') === FALSE) {
87  if (isset($parameters[$key . '.']) && $class === 'CHECKBOX') {
88  $childElementArguments = $parameters[$key . '.'];
89  if (isset($childElementArguments['checked'])) {
90  $childElementArguments['attributes']['selected'] = 'selected';
91  unset($childElementArguments['checked']);
92  }
93  if (isset($childElementArguments['label.'])) {
94  $childElementArguments['data'] = $childElementArguments['label.']['value'];
95  unset($childElementArguments['label.']);
96  }
97  $this->configuration['options'][] = $childElementArguments;
98  }
99  }
100  }
101  }
102  }
103 
110  protected function setVarious(array $parameters) {
111  if (isset($parameters['name'])) {
112  $this->configuration['various']['name'] = $parameters['name'];
113  }
114  }
115 
116 }
$parameters
Definition: FileDumpEID.php:15
static sortedKeyList($setupArr, $acceptOnlyProperties=FALSE)