Changeset 2941
- Timestamp:
- 07/23/08 16:21:56 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/project/modules/devel/cms3/portal/classes/portalparameterservices.class.php
r2919 r2941 10 10 class portalparameterservices { 11 11 12 /** 13 * Parse le XML pour récupérer les libelllés des portlets 14 * 15 * @return array : libellés 16 */ 17 static public function getCaptionFromXML ($moduleNode) { 18 if (CopixSession::get('tempory|var|parsingxml')) { 19 $search = CopixSession::get('tempory|var|parsingxml'); 20 } else { 21 return false; 22 } 23 CopixSession::delete ('tempory|var|parsingxml'); 24 $node = $moduleNode['portal']; 25 foreach ($node as $node2) { 26 if ($node2->getName () === 'type') { 27 $temp = $node2; 28 if ('id'.'|'.$temp['id'] === $search) { 29 if (_toString($temp['caption']) !== '') { 30 return _toString($temp['caption']); 31 } else if (_toString($temp['captioni18n']) !== '') { 32 return CopixI18N::get(_toString($temp['captioni18n'])); 33 } 34 } 35 } 36 } 37 } 12 38 13 39 14 /** trunk/project/modules/devel/cms3/portal/classes/portletservices.class.php
r2919 r2941 17 17 */ 18 18 public function getZoneId ($id) { 19 CopixClassesFactory::fileInclude ('portal|portalparameterservices'); 20 $config = CopixConfig::instance(); 21 $config->force_compile = true; 22 CopixSession::set('tempory|var|parsingxml', 'id'.'|'.$id); 23 $xml = CopixModule::getParsedModuleInformation ( 24 "portal_ParameterGroups", 25 "/moduledefinition/registry/entry[@id='Portlet']/*", 26 array ('portalparameterservices', 'getCaptionFromXML')); 27 return $xml; 19 $arData = self::getList(); 20 return $arData[$id]; 28 21 } 29 22
