Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 76 | 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) {
76 delphine 22
		$donnees['i18n'] = I18n::get('Recherche-accueil');
33 jpm 23
		$this->setSortie(self::RENDU_CORPS, $this->getVue('recherche_accueil', $donnees));
24
	}
25
 
57 delphine 26
	public function executerFormulaireNom($donnees = array()) {
86 delphine 27
		if (Config::get(Registre::get('parametres.referentiel').'.referentielVerna')) {
28
			if (!isset($donnees['type_nom'])) {
29
				$donnees['type_nom'] = (Registre::get('parametres.niveau') == 1) ? 'nom_vernaculaire' : 'nom_scientifique';
30
			}
31
			$donnees['nom_verna'] = true;
57 delphine 32
		}
86 delphine 33
 
33 jpm 34
		$donnees['i18n'] = I18n::get('Recherche-form-nom');
35
 
36
		return $this->getVue('form_nom', $donnees);
37
	}
38
 
74 delphine 39
	public function executerForm() {
76 delphine 40
		$donnees = Registre::get('donneesMoteur');
57 delphine 41
		$donnees['form_nom'] = $this->executerFormulaireNom($donnees);
42
		$this->afficherAccueil($donnees);
76 delphine 43
		Registre::detruire('donneesMoteur');
33 jpm 44
	}
53 delphine 45
 
74 delphine 46
 
54 delphine 47
 
33 jpm 48
}
49
?>