‪TYPO3CMS  ‪main
FlexFormEntryContainer.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
25 {
31  public function ‪render(): array
32  {
33  $flexFormDataStructureIdentifier = $this->data['parameterArray']['fieldConf']['config']['dataStructureIdentifier'];
34  $flexFormDataStructureArray = $this->data['parameterArray']['fieldConf']['config']['ds'];
35 
36  $options = ‪$this->data;
37  $options['flexFormDataStructureIdentifier'] = $flexFormDataStructureIdentifier;
38  $options['flexFormDataStructureArray'] = $flexFormDataStructureArray;
39  $options['flexFormRowData'] = $this->data['parameterArray']['itemFormElValue'];
40  $options['renderType'] = 'flexFormNoTabsContainer';
41 
42  // Enable tabs if there is more than one sheet
43  if (count($flexFormDataStructureArray['sheets']) > 1) {
44  $options['renderType'] = 'flexFormTabsContainer';
45  }
46 
47  $resultArray = $this->nodeFactory->create($options)->render();
48  $resultArray['html'] = $this->‪wrapWithFieldsetAndLegend($resultArray['html']);
49  return $resultArray;
50  }
51 }
‪TYPO3\CMS\Backend\Form\Container
Definition: AbstractContainer.php:16
‪TYPO3\CMS\Backend\Form\Container\AbstractContainer\wrapWithFieldsetAndLegend
‪wrapWithFieldsetAndLegend(string $fieldContent)
Definition: AbstractContainer.php:140
‪TYPO3\CMS\Backend\Form\AbstractNode\$data
‪array $data
Definition: AbstractNode.php:35
‪TYPO3\CMS\Backend\Form\Container\AbstractContainer
Definition: AbstractContainer.php:29
‪TYPO3\CMS\Backend\Form\Container\FlexFormEntryContainer\render
‪array render()
Definition: FlexFormEntryContainer.php:31
‪TYPO3\CMS\Backend\Form\Container\FlexFormEntryContainer
Definition: FlexFormEntryContainer.php:25