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