TYPO3 API  SVNRelease
class.tx_funcwizards_webfunc.php
Go to the documentation of this file.
00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
00006 *  All rights reserved
00007 *
00008 *  This script is part of the TYPO3 project. The TYPO3 project is
00009 *  free software; you can redistribute it and/or modify
00010 *  it under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2 of the License, or
00012 *  (at your option) any later version.
00013 *
00014 *  The GNU General Public License can be found at
00015 *  http://www.gnu.org/copyleft/gpl.html.
00016 *  A copy is found in the textfile GPL.txt and important notices to the license
00017 *  from the author is found in LICENSE.txt distributed with these scripts.
00018 *
00019 *
00020 *  This script is distributed in the hope that it will be useful,
00021 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 *  GNU General Public License for more details.
00024 *
00025 *  This copyright notice MUST APPEAR in all copies of the script!
00026 ***************************************************************/
00027 /**
00028  * Contains a class for the Wizard function in the Web>Info module
00029  *
00030  * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
00031  * XHTML compliant
00032  *
00033  * @author  Kasper Skårhøj <kasperYYYY@typo3.com>
00034  */
00035 /**
00036  * [CLASS/FUNCTION INDEX of SCRIPT]
00037  *
00038  *
00039  *
00040  *   66: class tx_funcwizards_webfunc extends t3lib_extobjbase
00041  *   78:     function init(&$pObj,$conf)
00042  *   92:     function modMenu()
00043  *  111:     function main()
00044  *
00045  * TOTAL FUNCTIONS: 3
00046  * (This index is automatically created/updated by the extension "extdeveval")
00047  *
00048  */
00049 
00050 /**
00051  * The Wizard function in the Web>Info module
00052  * Creates a framework for adding wizard sub-sub-modules under the Wizard function in Web>Info
00053  *
00054  * @author  Kasper Skårhøj <kasperYYYY@typo3.com>
00055  * @package TYPO3
00056  * @subpackage tx_funcwizardswebfunc
00057  */
00058 class tx_funcwizards_webfunc extends t3lib_extobjbase {
00059     var $function_key = 'wiz';
00060 
00061     /**
00062      * Initialize.
00063      * Calls parent init function and then the handleExternalFunctionValue() function from the parent class
00064      *
00065      * @param   object      A reference to the parent (calling) object (which is probably an instance of an extension class to t3lib_SCbase)
00066      * @param   array       The configuration set for this module - from global array TBE_MODULES_EXT
00067      * @return  void
00068      * @see t3lib_extobjbase::handleExternalFunctionValue(), t3lib_extobjbase::init()
00069      */
00070     function init(&$pObj,$conf) {
00071             // OK, handles ordinary init. This includes setting up the menu array with ->modMenu
00072         parent::init($pObj,$conf);
00073 
00074             // 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!!!
00075         $this->handleExternalFunctionValue();
00076     }
00077 
00078     /**
00079      * Modifies parent objects internal MOD_MENU array, adding items this module needs.
00080      *
00081      * @return  array       Items merged with the parent objects.
00082      * @see t3lib_extobjbase::init()
00083      */
00084     function modMenu()  {
00085         global $LANG;
00086 
00087         $modMenuAdd = array(
00088             $this->function_key => array()
00089         );
00090 
00091         $modMenuAdd[$this->function_key] = $this->pObj->mergeExternalItems($this->pObj->MCONF['name'],$this->function_key,$modMenuAdd[$this->function_key]);
00092         $modMenuAdd[$this->function_key] = t3lib_BEfunc::unsetMenuItems($this->pObj->modTSconfig['properties'],$modMenuAdd[$this->function_key],'menu.'.$this->function_key);
00093 
00094         return $modMenuAdd;
00095     }
00096 
00097     /**
00098      * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
00099      *
00100      * @return  string      The content
00101      * @see t3lib_extobjbase::extObjContent()
00102      */
00103     function main() {
00104         global $SOBE,$LANG;
00105 
00106         $menu= $LANG->getLL('wiz_lWizards',1).': '.t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[wiz]',$this->pObj->MOD_SETTINGS['wiz'],$this->pObj->MOD_MENU['wiz']);
00107         $theOutput.=$this->pObj->doc->section('','<span class="nobr">'.$menu.'</span>');
00108 
00109         $content = '';
00110         $content.=$theOutput;
00111         $content.=$this->pObj->doc->spacer(5);
00112         $content.=$this->extObjContent();
00113 
00114         return $content;
00115     }
00116 }
00117 
00118 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/func_wizards/class.tx_funcwizards_webfunc.php'])) {
00119     include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/func_wizards/class.tx_funcwizards_webfunc.php']);
00120 }
00121 ?>