Changeset 2939

Show
Ignore:
Timestamp:
07/23/08 16:18:50 (1 month ago)
Author:
alexandrej
Message:

Mise à jour sur les méthodes de parsing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/project/modules/devel/cms3/heading/classes/headingelementtype.class.php

    r2914 r2939  
    2828     */ 
    2929    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]; 
    3932    } 
    4033     
  • trunk/project/modules/devel/cms3/heading/classes/headingparameterservices.class.php

    r2914 r2939  
    380380    } 
    381381     
    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 
    410383    /** 
    411384     * Liste des types