Subversion Repositories eFlore/Applications.coel-consultation

Rev

Rev 18 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18 Rev 20
Line 51... Line 51...
51
				$liste[$cle] = self::formaterTableauValeur($valeur);
51
				$liste[$cle] = self::formaterTableauValeur($valeur);
52
			}
52
			}
53
			$retour = $liste;
53
			$retour = $liste;
54
		}
54
		}
55
		return $retour;
55
		return $retour;
56
	}	
56
	}
-
 
57
 
-
 
58
	public static function getListeTrieeParAbreviation($id_liste) {
-
 
59
		$retour = false;
-
 
60
		$liste = self::getListe($id_liste);
-
 
61
		if ($liste !== false) {
-
 
62
			$liste_par_abr = array();
-
 
63
			foreach ($liste as $cle => $valeur) {
-
 
64
				$valeur_fromatee = self::formaterTableauValeur($valeur);
-
 
65
				$abreviation = $valeur_fromatee['abreviation'];
-
 
66
				$liste_par_abr[$abreviation] = $valeur_fromatee;
-
 
67
			}
-
 
68
			$retour = $liste_par_abr;
-
 
69
		}
-
 
70
		return $retour;
-
 
71
	}
Line 57... Line 72...
57
	
72
	
58
	public static function chargerValeur($id_valeur) {
73
	public static function chargerValeur($id_valeur) {
59
		$retour = true;
74
		$retour = true;
60
		if (!isset(self::$ontologie_valeur[$id_valeur])) {
75
		if (!isset(self::$ontologie_valeur[$id_valeur])) {
Line 101... Line 116...
101
	
116
	
102
	private static function formaterTableauValeur($valeur) {
117
	private static function formaterTableauValeur($valeur) {
103
		$valeur_formatee = array();
118
		$valeur_formatee = array();
104
		if (is_array($valeur) && count($valeur) > 0) {
119
		if (is_array($valeur) && count($valeur) > 0) {
-
 
120
			$valeur_formatee = array(
105
			$valeur_formatee = array(
121
				'id' => $valeur['cmlv_id_valeur'],
106
				'parent' => $valeur['cmlv_id_valeur'],
122
				'parent' => $valeur['cmlv_ce_parent'],
107
				'projet' => $valeur['cmlv_ce_projet'], 
123
				'projet' => $valeur['cmlv_ce_projet'], 
108
				'nom' => $valeur['cmlv_nom'],
124
				'nom' => $valeur['cmlv_nom'],
109
				'abreviation' => $valeur['cmlv_abreviation'],
125
				'abreviation' => $valeur['cmlv_abreviation'],
110
				'description' => $valeur['cmlv_description'],
126
				'description' => $valeur['cmlv_description'],