Documentation TYPO3 par Ameos

class.tx_kickstarter_section_emconf.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 2001-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 ***************************************************************/
00031 require_once(t3lib_extMgm::extPath('kickstarter').'class.tx_kickstarter_sectionbase.php');
00032 
00033 class tx_kickstarter_section_emconf extends tx_kickstarter_sectionbase {
00034   var $sectionID = 'emconf';
00035 
00039         function render_wizard() {
00040                 $lines=array();
00041 
00042                 $action = explode(':',$this->wizard->modData['wizAction']);
00043 
00044                 if ($action[0]=='edit') {
00045                         $action[1]=1;
00046                         $this->regNewEntry($this->sectionID,$action[1]);
00047 
00048                         $lines = $this->catHeaderLines($lines,$this->sectionID,$this->wizard->options[$this->sectionID],'&nbsp;',$action[1]);
00049                         $piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];
00050 
00051                         $ffPrefix='['.$this->sectionID.']['.$action[1].']';
00052 
00053                         if (!$this->wizard->EMmode && $this->wizard->saveKey)   {
00054                                 $extKeyRec = $this->wizard->pObj->getExtKeyRecord($this->wizard->saveKey);
00055                         }
00056 
00057                                 // Title
00058                         $subContent='<strong>Title:</strong><BR>'.
00059                                 $this->renderStringBox($ffPrefix.'[title]',$piConf['title']?$piConf['title']:$extKeyRec['title']);
00060                         $lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';
00061 
00062                                 // Description
00063                         $subContent='<strong>Description:</strong><BR>'.
00064                                 $this->renderStringBox($ffPrefix.'[description]',$piConf['description']?$piConf['description']:$extKeyRec['description']);
00065                         $lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';
00066 
00067                                 // Sub-position
00068                         $optValues = Array(
00069                                 '' => '',
00070                                 'fe' => 'Frontend',
00071                                 'plugin' => 'Frontend Plugins',
00072                                 'be' => 'Backend',
00073                                 'module' => 'Backend Modules',
00074                                 'services' => 'Services',
00075                                 'example' => 'Examples',
00076                                 'misc' => 'Miscellaneous',
00077                                 'templates' => 'Templates',
00078                                 'doc' => 'Documentation',
00079                         );
00080                         $subContent='<strong>Category:</strong><BR>'.
00081                                 $this->renderSelectBox($ffPrefix.'[category]',$piConf['category'],$optValues);
00082                         $lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';
00083 
00084 
00085 
00086 
00087                                 // State
00088                         $optValues = Array(
00089                                 'alpha' => 'Alpha (Very initial development)',
00090                                 'beta' => 'Beta (Under current development, should work partly)',
00091                                 'stable' => 'Stable (Stable and used in production)',
00092                                 'experimental' => 'Experimental (Nobody knows if this is going anywhere yet...)',
00093                                 'test' => 'Test (Test extension, demonstrates concepts etc.)',
00094                         );
00095                         $subContent='<strong>State</strong><BR>'.
00096                                 $this->renderSelectBox($ffPrefix.'[state]',$piConf['state'],$optValues);
00097                         $lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';
00098 
00099                                 // Dependencies
00100                         $subContent='<strong>Dependencies (comma list of extkeys):</strong><BR>'.
00101                                 $this->renderStringBox($ffPrefix.'[dependencies]',$piConf['dependencies']);
00102                         $lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';
00103 
00104 
00105 
00106 
00107                                 // Author
00108                         $subContent='<strong>Author Name:</strong><BR>'.
00109                                 $this->renderStringBox($ffPrefix.'[author]',$piConf['author']?$piConf['author']:$GLOBALS['BE_USER']->user['realName']);
00110                         $lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';
00111 
00112                                 // Author/Email
00113                         $subContent='<strong>Author email:</strong><BR>'.
00114                                 $this->renderStringBox($ffPrefix.'[author_email]',$piConf['author_email']?$piConf['author_email']:$GLOBALS['BE_USER']->user['email']);
00115                         $lines[]='<tr'.$this->bgCol(3).'><td>'.$this->fw($subContent).'</td></tr>';
00116                 }
00117 
00118                 /* HOOK: Place a hook here, so additional output can be integrated */
00119                 if(is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_emconf'])) {
00120                   foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_emconf'] as $_funcRef) {
00121                     $lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);
00122                   }
00123                 }
00124 
00125                 $content = '<table border=0 cellpadding=2 cellspacing=2>'.implode('',$lines).'</table>';
00126                 return $content;
00127         }
00128 
00129         function render_extPart($k,$config,$extKey) {
00130 
00131         }
00132 }
00133 
00134 // Include ux_class extension?
00135 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/kickstarter/sections/class.tx_kickstarter_section_emconf.php']) {
00136         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/kickstarter/sections/class.tx_kickstarter_section_emconf.php']);
00137 }
00138 
00139 ?>


Généré par Les experts TYPO3 avec  doxygen 1.4.6