Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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
		$champs_presence_spl = explode('|', $champs_presence);
20
		foreach($champs_presence_spl as $champ) {
21
			$label_param_champ = explode(':', $champ);
22
			$tableau_champs_presence[] = array('param' => $label_param_champ[1],
23
												'label' => $label_param_champ[0]);
24
		}
25
		return $tableau_champs_presence;
26
	}
727 mathilde 27
}
28
?>