Documentation TYPO3 par Ameos

class.tx_taskcentermodules.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *  
00005 *  (c) 1999-2004 Kasper Skaarhoj (kasper@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 ***************************************************************/
00031 class tx_taskcentermodules extends mod_user_task {
00032 
00036         function overview_main()        {
00037                 // Modules might have a link to a totals-page where an overview of the modules content are present.
00038                 if (t3lib_extMgm::isLoaded("plugin_mgm") && $this->accessMod("web_modules"))    {
00039                         $mC = $this->renderModulesList();
00040                         if ($mC)        {
00041                                 $icon = '<img src="'.$this->backPath.t3lib_extMgm::extRelPath("taskcenter_modules").'ext_icon.gif" width=18 height=16 class="absmiddle">';
00042                                 return $this->mkMenuConfig($icon."&nbsp;".$this->headLink("tx_taskcentermodules",1),'',$mC);    
00043                         }
00044                 }
00045         }
00046         function main() {
00047                 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
00048         }
00049 
00050 
00051         // ************************
00052         // MODULES:
00053         // ***********************
00054         function renderModulesList()    {
00055                 global $LANG;
00056         
00057                 $mList = $this->getModuleList();
00058                 $modList = t3lib_BEfunc::getListOfBackendModules(explode(",",$mList),$this->perms_clause,$this->backPath);
00059 
00060                 $lines=array();
00061                 if (is_array($modList["rows"])) {
00062                         reset($modList["rows"]);
00063                         while(list(,$pageRow)=each($modList["rows"]))   {
00064                                 $path = t3lib_BEfunc::getRecordPath ($pageRow["uid"],$this->perms_clause,$this->BE_USER->uc["titleLen"]);
00065                                 $lines[]='<nobr>'.t3lib_iconworks::getIconImage("pages",$pageRow,$this->backPath,'hspace="2" align="top" title="'.htmlspecialchars($path)." - ".t3lib_BEfunc::titleAttribForPages($pageRow,"",0).'"').$this->recent_linkModulesModule($this->fixed_lgd($pageRow["title"]),$pageRow["uid"]).'</nobr><BR>';
00066                         }
00067                 }
00068                 $out = implode("",$lines);
00069 
00070                 return $out;
00071         }
00072         function recent_linkModulesModule($str,$id)     {
00073                 $str='<a href="'.$this->backPath.t3lib_extMgm::extRelPath("plugin_mgm").'modules/index.php?id='.$id.'" onClick="this.blur();">'.$str.'</a>';
00074                 return $str;
00075         }
00076         function getModuleList()        {
00077                 global $TCA;
00078                 $lP=array();
00079                 if (is_array($TCA["pages"]["columns"]["module"]["config"]["items"]))    {
00080                         reset($TCA["pages"]["columns"]["module"]["config"]["items"]);
00081                         while(list(,$p)=each($TCA["pages"]["columns"]["module"]["config"]["items"]))    {
00082                                 if (trim($p[1]))        {
00083                                         $lP[]=trim($p[1]);
00084                                 }
00085                         }
00086                 }
00087                 return implode(",",$lP);
00088         }
00089 }
00090 
00091 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter_modules/class.tx_taskcentermodules.php"])   {
00092         include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter_modules/class.tx_taskcentermodules.php"]);
00093 }
00094 
00095 ?>


Généré par L'expert TYPO3 avec  doxygen 1.4.6