00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00145 class t3lib_extobjbase {
00146
00151 var $pObj;
00152
00157 var $thisPath = '';
00158
00163 var $localLangFile = 'locallang.php';
00164
00170 var $extClassConf;
00171
00179 var $function_key = '';
00180
00181
00182
00183
00184
00185
00186
00187
00188
00197 function init(&$pObj,$conf) {
00198 global $LANG;
00199
00200 $this->pObj = &$pObj;
00201
00202
00203 $this->thisPath = dirname($conf['path']);
00204 if (!@is_dir($this->thisPath)) {
00205 die('Error: '.$this->thisPath.' was not a directory as expected...');
00206 }
00207
00208
00209 $this->incLocalLang();
00210
00211
00212 $this->pObj->MOD_MENU = array_merge($this->pObj->MOD_MENU,$this->modMenu());
00213 }
00214
00221 function handleExternalFunctionValue() {
00222
00223 $this->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->pObj->MOD_MENU, t3lib_div::_GP('SET'), $this->pObj->MCONF['name']);
00224 if ($this->function_key) {
00225 $this->extClassConf = $this->pObj->getExternalItemConfig($this->pObj->MCONF['name'],$this->function_key,$this->pObj->MOD_SETTINGS[$this->function_key]);
00226 if (is_array($this->extClassConf) && $this->extClassConf['path']) {
00227 $this->pObj->include_once[] = $this->extClassConf['path'];
00228 }
00229 }
00230 }
00231
00237 function incLocalLang() {
00238 global $LANG;
00239 #if ($this->localLangFile && @is_file($this->thisPath.'/'.$this->localLangFile)) {
00240 # include($this->thisPath.'/'.$this->localLangFile);
00241 if ($this->localLangFile && (@is_file($this->thisPath.'/'.$this->localLangFile) || @is_file($this->thisPath.'/'.substr($this->localLangFile,0,-4).'.xml'))) {
00242 $LOCAL_LANG = $LANG->includeLLFile($this->thisPath.'/'.$this->localLangFile, FALSE);
00243 if (is_array($LOCAL_LANG)) $GLOBALS['LOCAL_LANG'] = t3lib_div::array_merge_recursive_overrule($GLOBALS['LOCAL_LANG'],$LOCAL_LANG);
00244 }
00245 }
00246
00253 function checkExtObj() {
00254 if (is_array($this->extClassConf) && $this->extClassConf['name']) {
00255 $this->extObj = t3lib_div::makeInstance($this->extClassConf['name']);
00256 $this->extObj->init($this->pObj,$this->extClassConf);
00257
00258
00259 $this->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->pObj->MOD_MENU, t3lib_div::_GP('SET'), $this->pObj->MCONF['name']);
00260 }
00261 }
00262
00268 function extObjContent() {
00269 if (is_object($this->extObj)) return $this->extObj->main();
00270 }
00271
00279 function modMenu() {
00280 return array();
00281 }
00282 }
00283 ?>