Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
727 mathilde 1
<?php
2
class RechercheAvancee extends aControleur {
3
 
4
	public function executerFormulaireRechercheAv($donnees= array()) {
931 delphine 5
		$donnees['lien'] = (isset($donnees['params'])) ? $this->urls->obtenirUrlRechercheAvancee($donnees['params'])
6
			: $this->urls->obtenirUrlRechercheAvancee();
727 mathilde 7
		$donnees['i18n'] = I18n::get('Recherche-form-avancee');
8
		$donnees['referentiel'] = Registre::get('parametres.referentiel');
9
		$donnees['url_base_completion_noms_sci'] = str_replace('{projet}', $donnees['referentiel'], Config::get('nomsTpl'));
996 aurelien 10
		$donnees['champs_presence'] = $this->obtenirChampsPresence();
727 mathilde 11
		$donnees['url_form'] = $this->urls->obtenirUrlBase();
12
		return $this->getVue('form_recherche_av', $donnees);
13
	}
996 aurelien 14
 
15
	private function obtenirChampsPresence() {
16
		$tableau_champs_presence = array();
17
		$referentiel = Registre::get('parametres.referentiel');
18
		$champs_presence = Config::get($referentiel.'.champsPresence');
19
		//echo '<pre>'.print_r($champs_presence,true).'</pre>';exit;
20
		$champs_presence_spl = explode('|', $champs_presence);
21
		foreach($champs_presence_spl as $champ) {
22
			$label_param_champ = explode(':', $champ);
23
			$tableau_champs_presence[] = array('param' => $label_param_champ[1],
24
												'label' => $label_param_champ[0]);
25
		}
26
		return $tableau_champs_presence;
27
	}
727 mathilde 28
}
29
?>