Documentation TYPO3 par Ameos |
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 1999-2005 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 ***************************************************************/ 00074 function user_itemArrayProcFuncTest($menuArr,$conf) { 00075 if ($conf['demoItemStates']) { // Used in the example of item states 00076 reset($menuArr); 00077 $c=0; 00078 $teststates=explode(',','NO,ACT,IFSUB,CUR,USR,SPC,USERDEF1,USERDEF2'); 00079 while(list($k,$v)=each($menuArr)) { 00080 $menuArr[$k]['ITEM_STATE']=$teststates[$c]; 00081 $menuArr[$k]['title'].= ($teststates[$c] ? ' ['.$teststates[$c].']' : ''); 00082 $c++; 00083 } 00084 } else { // used in the fake menu item example! 00085 if (!count($menuArr)) { // There must be no menu items if we add the parent page to the submenu: 00086 $parentPageId = $conf['parentObj']->id; // id of the parent page 00087 $parentPageRow = $GLOBALS['TSFE']->sys_page->getPage($parentPageId); // ... and get the record... 00088 if (is_array($parentPageRow)) { // ... and if that page existed (a row was returned) then add it! 00089 $menuArr[]=$parentPageRow; 00090 } 00091 } 00092 } 00093 return $menuArr; 00094 } 00095 00104 function user_IProcFuncTest($I,$conf) { 00105 $itemRow = $conf['parentObj']->menuArr[$I['key']]; 00106 00107 // Setting the document status content to the value of the page title on mouse over 00108 $I['linkHREF']['onMouseover'].='extraRollover(\''.rawurlencode($itemRow['title']).'\');'; 00109 $conf['parentObj']->I = $I; 00110 $conf['parentObj']->setATagParts(); 00111 $I = $conf['parentObj']->I; 00112 if ($I['parts']['ATag_begin']) $I['parts']['ATag_begin']=$I['A1']; 00113 00114 if ($conf['debug']) { 00115 // Outputting for debug example: 00116 echo 'ITEM: <h2>'.htmlspecialchars($itemRow['uid'].': '.$itemRow['title']).'</h2>'; 00117 t3lib_div::debug($itemRow); 00118 t3lib_div::debug($I); 00119 echo '<hr />'; 00120 } 00121 // Returns: 00122 return $I; 00123 } 00124 00125 00126 ?>