Documentation TYPO3 par Ameos

class.tx_taskcentermodules.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *  
00005 *  (c) 1999-2004 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 ***************************************************************/
00031 class tx_taskcentermodules extends mod_user_task {
00032 
00036         function overview_main(&$pObj)  {
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                                 $content.=$pObj->doc->section($icon."&nbsp;".$this->headLink("tx_taskcentermodules",1),$mC,1,1,0,1);    
00043                         }
00044                 }
00045                 return $content;
00046         }
00047         function main() {
00048                 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
00049         }
00050 
00051 
00052         // ************************
00053         // MODULES:
00054         // ***********************
00055         function renderModulesList()    {
00056                 global $LANG;
00057         
00058                 $mList = $this->getModuleList();
00059                 $modList = t3lib_BEfunc::getListOfBackendModules(explode(",",$mList),$this->perms_clause,$this->backPath);
00060 
00061                 $lines=array();
00062                 if (is_array($modList["rows"])) {
00063                         reset($modList["rows"]);
00064                         while(list(,$pageRow)=each($modList["rows"]))   {
00065                                 $path = t3lib_BEfunc::getRecordPath ($pageRow["uid"],$this->perms_clause,$this->BE_USER->uc["titleLen"]);
00066                                 $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>';
00067                         }
00068                 }
00069                 $out = implode("",$lines);
00070 
00071                 return $out;
00072         }
00073         function recent_linkModulesModule($str,$id)     {
00074                 $str='<a href="'.$this->backPath.t3lib_extMgm::extRelPath("plugin_mgm").'modules/index.php?id='.$id.'" target="list_frame" onClick="this.blur();">'.$str.'</a>';
00075                 return $str;
00076         }
00077         function getModuleList()        {
00078                 global $TCA;
00079                 $lP=array();
00080                 if (is_array($TCA["pages"]["columns"]["module"]["config"]["items"]))    {
00081                         reset($TCA["pages"]["columns"]["module"]["config"]["items"]);
00082                         while(list(,$p)=each($TCA["pages"]["columns"]["module"]["config"]["items"]))    {
00083                                 if (trim($p[1]))        {
00084                                         $lP[]=trim($p[1]);
00085                                 }
00086                         }
00087                 }
00088                 return implode(",",$lP);
00089         }
00090 }
00091 
00092 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter_modules/class.tx_taskcentermodules.php"])   {
00093         include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter_modules/class.tx_taskcentermodules.php"]);
00094 }
00095 
00096 ?>


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6