TYPO3 CMS  TYPO3_7-6
TextareaJsonElement.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-basic-textarea';
28 
34  public $configuration = [
35  'attributes' => [
36  'cols' => 40,
37  'rows' => 5
38  ],
39  'filters' => [],
40  'label' => [
41  'value' => ''
42  ],
43  'layout' => 'front',
44  'validation' => []
45  ];
46 
52  protected $allowedAttributes = [
53  'accesskey',
54  'class',
55  'contenteditable',
56  'contextmenu',
57  'dir',
58  'draggable',
59  'dropzone',
60  'hidden',
61  'id',
62  'lang',
63  'spellcheck',
64  'style',
65  'tabindex',
66  'title',
67  'translate',
68  /* element specific attributes */
69  'autofocus',
70  'cols',
71  'disabled',
72  'inputmode',
73  'maxlength',
74  'minlength',
75  'name',
76  'placeholder',
77  'readonly',
78  'required',
79  'rows',
80  'selectionDirection',
81  'selectionEnd',
82  'selectionStart',
83  'text',
84  'wrap'
85  ];
86 
93  protected function setAttributes(array $parameters)
94  {
95  // preserve backward compatibility by rewriting data to text
96  if (isset($parameters['data'])) {
97  $this->configuration['attributes']['text'] = $parameters['data'];
98  }
99  parent::setAttributes($parameters);
100  }
101 }