TYPO3 CMS  TYPO3_7-6
NameJsonElement.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
21 {
27  public $xtype = 'typo3-form-wizard-elements-predefined-name';
28 
34  public $configuration = [
35  'attributes' => [],
36  'legend' => [
37  'value' => ''
38  ],
39  'various' => [
40  'prefix' => false,
41  'suffix' => false,
42  'middleName' => false
43  ]
44  ];
45 
51  protected $allowedAttributes = [
52  'class',
53  'dir',
54  'id',
55  'lang',
56  'style'
57  ];
58 
66  public function setParameters(array $parameters)
67  {
68  parent::setParameters($parameters);
69  $this->setVarious($parameters);
70  }
71 
81  protected function setVarious(array $parameters)
82  {
83  if (is_array($parameters)) {
85  foreach ($keys as $key) {
86  $class = $parameters[$key];
87  if ((int)$key && strpos($key, '.') === false) {
88  if (isset($parameters[$key . '.'])) {
89  $childElementArguments = $parameters[$key . '.'];
90  if (in_array($childElementArguments['name'], ['prefix', 'suffix', 'middleName'])) {
91  $this->configuration['various'][$childElementArguments['name']] = true;
92  }
93  }
94  }
95  }
96  }
97  }
98 }
static sortedKeyList($setupArr, $acceptOnlyProperties=false)