Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 70 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 jpm 1
<?php
2
class RechercheSimple extends aControleur {
3
 
4
	//+----------------------------------------------------------------------------------------------------------------+
5
	// Méthodes
6
	/**
7
	 * Fonction d'affichage par défaut
8
	 */
53 delphine 9
 
10
 
33 jpm 11
	public function executerActionParDefaut() {
12
		$this->executerAccueil();
13
	}
14
 
15
	public function executerAccueil() {
16
		$donnees = array();
57 delphine 17
		$donnees['form_nom'] = $this->executerFormulaireNom();
18
		$this->afficherAccueil($donnees);
19
	}
20
 
21
	private function afficherAccueil($donnees) {
33 jpm 22
		$donnees['i18n'] = I18n::get('Recherche-accueil');
23
 
24
		$this->setSortie(self::RENDU_CORPS, $this->getVue('recherche_accueil', $donnees));
25
	}
26
 
57 delphine 27
	public function executerFormulaireNom($donnees = array()) {
28
		if (!isset($donnees['type_nom'])) {
29
			$donnees['type_nom'] = (Registre::get('parametres.niveau') == 1) ? 'nom_vernaculaire' : 'nom_scientifique';
30
		}
33 jpm 31
		$donnees['i18n'] = I18n::get('Recherche-form-nom');
32
 
33
		return $this->getVue('form_nom', $donnees);
34
	}
35
 
74 delphine 36
	public function executerForm() {
37
		$donnees = Registre::get('donnees');
57 delphine 38
		$donnees['form_nom'] = $this->executerFormulaireNom($donnees);
39
		$this->afficherAccueil($donnees);
33 jpm 40
	}
53 delphine 41
 
74 delphine 42
 
54 delphine 43
 
33 jpm 44
}
45
?>