[TASK] Remove @package and @subpackage annotations
[Packages/TYPO3.CMS.git] / typo3 / sysext / func_wizards / Classes / Controller / WebFunctionWizardsBaseController.php
1 <?php
2 namespace TYPO3\CMS\FuncWizards\Controller;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 * A copy is found in the textfile GPL.txt and important notices to the license
19 * from the author is found in LICENSE.txt distributed with these scripts.
20 *
21 *
22 * This script is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * This copyright notice MUST APPEAR in all copies of the script!
28 ***************************************************************/
29 /**
30 * Contains a class for the Wizard function in the Web>Info module
31 *
32 * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
33 * XHTML compliant
34 *
35 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
36 */
37 /**
38 * The Wizard function in the Web>Info module
39 * Creates a framework for adding wizard sub-sub-modules under the Wizard function in Web>Info
40 *
41 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
42 */
43 class WebFunctionWizardsBaseController extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule {
44
45 /**
46 * @todo Define visibility
47 */
48 public $function_key = 'wiz';
49
50 /**
51 * Initialize.
52 * Calls parent init function and then the handleExternalFunctionValue() function from the parent class
53 *
54 * @param object $pObj A reference to the parent (calling) object (which is probably an instance of an extension class to t3lib_SCbase)
55 * @param array $conf The configuration set for this module - from global array TBE_MODULES_EXT
56 * @return void
57 * @see t3lib_extobjbase::handleExternalFunctionValue(), t3lib_extobjbase::init()
58 * @todo Define visibility
59 */
60 public function init(&$pObj, $conf) {
61 // OK, handles ordinary init. This includes setting up the menu array with ->modMenu
62 parent::init($pObj, $conf);
63 // Making sure that any further external classes are added to the include_once array. Notice that inclusion happens twice in the main script because of this!!!
64 $this->handleExternalFunctionValue();
65 }
66
67 /**
68 * Modifies parent objects internal MOD_MENU array, adding items this module needs.
69 *
70 * @return array Items merged with the parent objects.
71 * @see t3lib_extobjbase::init()
72 * @todo Define visibility
73 */
74 public function modMenu() {
75 global $LANG;
76 $modMenuAdd = array(
77 $this->function_key => array()
78 );
79 $modMenuAdd[$this->function_key] = $this->pObj->mergeExternalItems($this->pObj->MCONF['name'], $this->function_key, $modMenuAdd[$this->function_key]);
80 $modMenuAdd[$this->function_key] = \TYPO3\CMS\Backend\Utility\BackendUtility::unsetMenuItems($this->pObj->modTSconfig['properties'], $modMenuAdd[$this->function_key], 'menu.' . $this->function_key);
81 return $modMenuAdd;
82 }
83
84 /**
85 * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
86 *
87 * @return string The content
88 * @see t3lib_extobjbase::extObjContent()
89 * @todo Define visibility
90 */
91 public function main() {
92 global $SOBE, $LANG;
93 $menu = $LANG->getLL('wiz_lWizards', 1) . ': ' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[wiz]', $this->pObj->MOD_SETTINGS['wiz'], $this->pObj->MOD_MENU['wiz']);
94 $theOutput .= $this->pObj->doc->section('', '<span class="nobr">' . $menu . '</span>');
95 $content = '';
96 $content .= $theOutput;
97 $content .= $this->pObj->doc->spacer(20);
98 $content .= $this->extObjContent();
99 return $content;
100 }
101
102 }
103
104
105 ?>