Some work done on glossary in CSH
[Packages/TYPO3.CMS.git] / typo3 / sysext / func_wizards / class.tx_funcwizards_webfunc.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2004 Kasper Skaarhoj (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 * [CLASS/FUNCTION INDEX of SCRIPT]
37 *
38 *
39 *
40 * 66: class tx_funcwizards_webfunc extends t3lib_extobjbase
41 * 78: function init(&$pObj,$conf)
42 * 92: function modMenu()
43 * 111: function main()
44 *
45 * TOTAL FUNCTIONS: 3
46 * (This index is automatically created/updated by the extension "extdeveval")
47 *
48 */
49
50 require_once(PATH_t3lib.'class.t3lib_extobjbase.php');
51
52
53
54
55
56
57
58 /**
59 * The Wizard function in the Web>Info module
60 * Creates a framework for adding wizard sub-sub-modules under the Wizard function in Web>Info
61 *
62 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
63 * @package TYPO3
64 * @subpackage tx_funcwizardswebfunc
65 */
66 class tx_funcwizards_webfunc extends t3lib_extobjbase {
67 var $function_key = 'wiz';
68
69 /**
70 * Initialize.
71 * Calls parent init function and then the handleExternalFunctionValue() function from the parent class
72 *
73 * @param object A reference to the parent (calling) object (which is probably an instance of an extension class to t3lib_SCbase)
74 * @param array The configuration set for this module - from global array TBE_MODULES_EXT
75 * @return void
76 * @see t3lib_extobjbase::handleExternalFunctionValue(), t3lib_extobjbase::init()
77 */
78 function init(&$pObj,$conf) {
79 // OK, handles ordinary init. This includes setting up the menu array with ->modMenu
80 parent::init($pObj,$conf);
81
82 // 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!!!
83 $this->handleExternalFunctionValue();
84 }
85
86 /**
87 * Modifies parent objects internal MOD_MENU array, adding items this module needs.
88 *
89 * @return array Items merged with the parent objects.
90 * @see t3lib_extobjbase::init()
91 */
92 function modMenu() {
93 global $LANG;
94
95 $modMenuAdd = array(
96 $this->function_key => array()
97 );
98
99 $modMenuAdd[$this->function_key] = $this->pObj->mergeExternalItems($this->pObj->MCONF['name'],$this->function_key,$modMenuAdd[$this->function_key]);
100 $modMenuAdd[$this->function_key] = t3lib_BEfunc::unsetMenuItems($this->pObj->modTSconfig['properties'],$modMenuAdd[$this->function_key],'menu.'.$this->function_key);
101
102 return $modMenuAdd;
103 }
104
105 /**
106 * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
107 *
108 * @return string The content
109 * @see t3lib_extobjbase::extObjContent()
110 */
111 function main() {
112 global $SOBE,$LANG;
113
114 $menu= $LANG->getLL('wiz_lWizards',1).': '.t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[wiz]',$this->pObj->MOD_SETTINGS['wiz'],$this->pObj->MOD_MENU['wiz']);
115 $theOutput.=$this->pObj->doc->section('','<span class="nobr">'.$menu.'</span>');
116
117 $content = '';
118 $content.=$theOutput;
119 $content.=$this->pObj->doc->spacer(5);
120 $content.=$this->extObjContent();
121
122 return $content;
123 }
124 }
125
126 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/func_wizards/class.tx_funcwizards_webfunc.php']) {
127 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/func_wizards/class.tx_funcwizards_webfunc.php']);
128 }
129 ?>