Changeset 2939
- Timestamp:
- 07/23/08 16:18:50 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/project/modules/devel/cms3/heading/classes/headingelementtype.class.php
r2914 r2939 28 28 */ 29 29 public function getCaption ($id) { 30 CopixClassesFactory::fileInclude ('heading|headingparameterservices'); 31 $config = CopixConfig::instance(); 32 $config->force_compile = true; 33 CopixSession::set('tempory|var|parsingxml', 'id'.'|'.$id); 34 $xml = CopixModule::getParsedModuleInformation ( 35 "heading_ParameterGroups", 36 "/moduledefinition/registry/entry[@id='HeadingElement']/*", 37 array ('HeadingParameterServices', 'getTypeCaptionFromXML')); 38 return $xml; 30 $arData = self::getList($id); 31 return $arData[$id]; 39 32 } 40 33 trunk/project/modules/devel/cms3/heading/classes/headingparameterservices.class.php
r2914 r2939 380 380 } 381 381 382 /** 383 * Retourne le libellé d'un type 384 * 385 * @param unknown_type $moduleNode 386 * @return String Libellé 387 */ 388 static public function getTypeCaptionFromXML ($moduleNode) { 389 if (CopixSession::get('tempory|var|parsingxml')) { 390 $search = CopixSession::get('tempory|var|parsingxml'); 391 } else { 392 return false; 393 } 394 CopixSession::delete ('tempory|var|parsingxml'); 395 $node = $moduleNode['heading']; 396 foreach ($node as $node2) { 397 if ($node2->getName () === 'type') { 398 $temp = $node2; 399 if ('id'.'|'.$temp['id'] === $search) { 400 if (_toString($temp['caption']) !== '') { 401 return _toString($temp['caption']); 402 } else if (_toString($temp['captioni18n']) !== '') { 403 return CopixI18N::get(_toString($temp['captioni18n'])); 404 } 405 } 406 } 407 } 408 } 409 382 410 383 /** 411 384 * Liste des types
