‪TYPO3CMS  ‪main
UserElement.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
28 {
34  public function ‪render(): array
35  {
36  // Render some dummy output to explain this element should usually not be called at all.
37  $resultArray = $this->‪initializeResultArray();
38  $fieldName = $this->data['flexFormFieldName'] ?? $this->data['fieldName'];
39  $html = [];
40  $html[] = '<div class="alert alert-warning">';
41  $html[] = 'This is dummy output: Field <code>' . htmlspecialchars($fieldName) . '</code>';
42  $html[] = 'of table <code>' . htmlspecialchars($this->data['tableName']) . '</code>';
43  $html[] = ' is registered as type="user" element without a specific renderType.';
44  $html[] = ' Please look up details in TCA reference documentation for type="user".';
45  $html[] = '</div>';
46  $resultArray['html'] = $this->‪wrapWithFieldsetAndLegend(implode(LF, $html));
47  return $resultArray;
48  }
49 }
‪TYPO3\CMS\Backend\Form\Element\AbstractFormElement
Definition: AbstractFormElement.php:37
‪TYPO3\CMS\Backend\Form\Element
Definition: AbstractFormElement.php:16
‪TYPO3\CMS\Backend\Form\Element\UserElement\render
‪array render()
Definition: UserElement.php:34
‪TYPO3\CMS\Backend\Form\Element\AbstractFormElement\wrapWithFieldsetAndLegend
‪wrapWithFieldsetAndLegend(string $innerHTML)
Definition: AbstractFormElement.php:133
‪TYPO3\CMS\Backend\Form\Element\UserElement
Definition: UserElement.php:28
‪TYPO3\CMS\Backend\Form\AbstractNode\initializeResultArray
‪initializeResultArray()
Definition: AbstractNode.php:77