2 namespace TYPO3\CMS\FuncWizards\Controller
;
5 * This file is part of the TYPO3 CMS project.
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.
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
14 * The TYPO3 project - inspiring people to share!
18 * The Wizard function in the Web>Info module
19 * Creates a framework for adding wizard sub-sub-modules under the Wizard function in Web>Info
21 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
23 class WebFunctionWizardsBaseController
extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule
{
28 public $function_key = 'wiz';
32 * Calls parent init function and then the handleExternalFunctionValue() function from the parent class
34 * @param object $pObj A reference to the parent (calling) object (which is probably an instance of an extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass)
35 * @param array $conf The configuration set for this module - from global array TBE_MODULES_EXT
38 public function init(&$pObj, $conf) {
39 // OK, handles ordinary init. This includes setting up the menu array with ->modMenu
40 parent
::init($pObj, $conf);
41 // Making sure that any further external classes are added to the include_once array.
42 // Notice that inclusion happens twice in the main script because of this!!!
43 $this->handleExternalFunctionValue();
47 * Modifies parent objects internal MOD_MENU array, adding items this module needs.
49 * @return array Items merged with the parent objects.
51 public function modMenu() {
52 $GLOBALS['LANG']->includeLLFile('EXT:func_wizards/locallang.xlf');
54 $this->function_key
=> array()
56 $modMenuAdd[$this->function_key
] = $this->pObj
->mergeExternalItems($this->pObj
->MCONF
['name'], $this->function_key
, $modMenuAdd[$this->function_key
]);
57 $modMenuAdd[$this->function_key
] = \TYPO3\CMS\Backend\Utility\BackendUtility
::unsetMenuItems(
58 $this->pObj
->modTSconfig
['properties'],
59 $modMenuAdd[$this->function_key
],
60 'menu.' . $this->function_key
66 * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
68 * @return string The content
70 public function main() {
71 $menu = \TYPO3\CMS\Backend\Utility\BackendUtility
::getFuncMenu(
74 $this->pObj
->MOD_SETTINGS
['wiz'],
75 $this->pObj
->MOD_MENU
['wiz']
80 $menu = $GLOBALS['LANG']->getLL('wiz_lWizards', TRUE) . ': ' . $menu;
81 $content = $this->pObj
->doc
->section('', '<span class="nobr">' . $menu . '</span>');
82 $content .= $this->pObj
->doc
->spacer(20);
85 $content .= $this->extObjContent();