NoTabsContainer.php 1.24 KB
Newer Older
Christian Kuhn's avatar
Christian Kuhn committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
namespace TYPO3\CMS\Backend\Form\Container;

/*
 * This file is part of the TYPO3 CMS project.
 *
 * It is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, either version 2
 * of the License, or any later version.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 *
 * The TYPO3 project - inspiring people to share!
 */

use TYPO3\CMS\Core\Utility\GeneralUtility;
18
use TYPO3\CMS\Backend\Form\NodeFactory;
Christian Kuhn's avatar
Christian Kuhn committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

/**
 * Handle a record that has no tabs.
 *
 * This container is called by FullRecordContainer and just wraps the output
 * of PaletteAndSingleContainer in some HTML.
 */
class NoTabsContainer extends AbstractContainer {

	/**
	 * Entry method
	 *
	 * @return array As defined in initializeResultArray() of AbstractNode
	 */
	public function render() {
34
		$options = $this->globalOptions;
35
		$options['renderType'] = 'paletteAndSingleContainer';
36
37
38
		/** @var NodeFactory $nodeFactory */
		$nodeFactory = $this->globalOptions['nodeFactory'];
		$resultArray = $nodeFactory->create($options)->render();
Christian Kuhn's avatar
Christian Kuhn committed
39
40
41
42
43
		$resultArray['html'] = '<div class="tab-content">' . $resultArray['html'] . '</div>';
		return $resultArray;
	}

}