alt_menu_sel.php

Go to the documentation of this file.
00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 1999-2008 Kasper Skaarhoj (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  * Creates the selector-box menu.
00029  * The selector-box menu is an alternative to the vertical default menu.
00030  * If configured to appear it will be displayed in the top-frame.
00031  *
00032  * $Id: alt_menu_sel.php 4433 2008-11-07 04:13:12Z flyguide $
00033  * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
00034  * XHTML compliant
00035  *
00036  * @author  Kasper Skaarhoj <kasperYYYY@typo3.com>
00037  */
00038 /**
00039  * [CLASS/FUNCTION INDEX of SCRIPT]
00040  *
00041  *
00042  *
00043  *   73: class SC_alt_menu_sel
00044  *   81:     function main()
00045  *  108:     function printContent()
00046  *
00047  * TOTAL FUNCTIONS: 2
00048  * (This index is automatically created/updated by the extension "extdeveval")
00049  *
00050  */
00051 
00052 
00053 require ('init.php');
00054 require ('template.php');
00055 require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
00056 require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
00057 require_once ('class.alt_menu_functions.inc');
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 /**
00067  * Script Class for rendering the selector box menu
00068  *
00069  * @author  Kasper Skaarhoj <kasperYYYY@typo3.com>
00070  * @package TYPO3
00071  * @subpackage core
00072  */
00073 class SC_alt_menu_sel {
00074     var $content;
00075 
00076     /**
00077      * Main function, making the selector box menu
00078      *
00079      * @return  void
00080      */
00081     function main() {
00082         global $TBE_MODULES,$TBE_TEMPLATE;
00083 
00084             // Initialize modules
00085         $loadModules = t3lib_div::makeInstance('t3lib_loadModules');
00086         $loadModules->observeWorkspaces = TRUE;
00087         $loadModules->load($TBE_MODULES);
00088 
00089             // Start page
00090         $TBE_TEMPLATE->form = '<form action="">';
00091 
00092             // add menu JS
00093         $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
00094         $TBE_TEMPLATE->JScodeArray[] = $alt_menuObj->generateMenuJScode($loadModules->modules);
00095 
00096         $this->content.=$TBE_TEMPLATE->startPage('Selector box menu');
00097 
00098             // Make menu and add it:
00099         $this->content.=$alt_menuObj->topMenu($loadModules->modules,0,'',2);
00100 
00101             // End page:
00102         $this->content.=$TBE_TEMPLATE->endPage();
00103     }
00104 
00105     /**
00106      * Outputting the accumulated content to screen
00107      *
00108      * @return  void
00109      */
00110     function printContent() {
00111         echo $this->content;
00112     }
00113 }
00114 
00115 
00116 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_menu_sel.php'])  {
00117     include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_menu_sel.php']);
00118 }
00119 
00120 
00121 
00122 // Make instance:
00123 $SOBE = t3lib_div::makeInstance('SC_alt_menu_sel');
00124 $SOBE->main();
00125 $SOBE->printContent();
00126 
00127 ?>

Generated on Sat Jan 3 04:23:28 2009 for TYPO3 API by  doxygen 1.4.7