[TASK] Move aboutmodules files into extension directory
[Packages/TYPO3.CMS.git] / typo3 / sysext / aboutmodules / mod / index.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 /**
29 * 'About modules' script - the default start-up module.
30 * Will display the list of main- and sub-modules available to the user.
31 * Each module will be show with description and a link to the module.
32 *
33 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
34 * @package TYPO3
35 * @subpackage core
36 */
37 class SC_mod_help_aboutmodules_index {
38
39 /**
40 * Object for backend modules.
41 *
42 * @var t3lib_loadModules
43 */
44 var $loadModules;
45 var $content;
46
47 /**
48 * Initialization of script class
49 *
50 * @return void
51 */
52 function init() {
53 // Loads the available backend modules so we can create the description overview.
54 $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_alt_intro.xml');
55 $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
56 $this->loadModules->observeWorkspaces = TRUE;
57 $this->loadModules->load($GLOBALS['TBE_MODULES']);
58 }
59
60 /**
61 * Main content - displaying the module descriptions
62 *
63 * @return void
64 */
65 function main() {
66 /** @var $menuObj tx_aboutmodules_Functions */
67 $menuObj = t3lib_div::makeInstance('tx_aboutmodules_Functions');
68
69 $GLOBALS['TBE_TEMPLATE']->divClass = $GLOBALS['TBE_TEMPLATE']->bodyTagId;
70 $GLOBALS['TBE_TEMPLATE']->backPath = $GLOBALS['BACK_PATH'];
71
72 $this->content = '
73 <div id="typo3-docheader">
74 <div id="typo3-docheader-row1">&nbsp;</div>
75 </div>
76 <div id="typo3-alt-intro-php-sub">
77 <h1>TYPO3 ' . TYPO3_version . '<br />' . $GLOBALS['LANG']->getLL('introtext') . '</h1>
78
79 <p>' . t3lib_BEfunc::TYPO3_copyRightNotice() . '</p>';
80
81 $this->content .= '
82 ' . t3lib_BEfunc::displayWarningMessages();
83
84 $this->content .= '
85 <h3>' . $GLOBALS['LANG']->getLL('introtext2') . '</h3>';
86
87
88 // Printing the description of the modules available
89 $this->content .= $menuObj->topMenu($this->loadModules->modules, 0, '', 1);
90 $this->content .= '<br />';
91
92 // end text: 'Features may vary depending on your website and permissions'
93 $this->content .= '<p class="c-features"><em>(' . $GLOBALS['LANG']->getLL('endText') . ')</em></p>';
94 $this->content .= '<br /></div>';
95
96 // Renders the module page
97 $this->content = $GLOBALS['TBE_TEMPLATE']->render(
98 'About modules',
99 $this->content,
100 TRUE
101 );
102 }
103
104 /**
105 * Outputting the accumulated content to screen
106 *
107 * @return void
108 */
109 function printContent() {
110 echo $this->content;
111 }
112 }
113
114 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/aboutmodules/mod/index.php'])) {
115 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/aboutmodules/mod/index.php']);
116 }
117
118
119 // Make instance:
120 $SOBE = t3lib_div::makeInstance('SC_mod_help_aboutmodules_index');
121 $SOBE->init();
122 $SOBE->main();
123 $SOBE->printContent();
124 ?>