Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 86 | 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 {
97 jpm 3
 
33 jpm 4
	//+----------------------------------------------------------------------------------------------------------------+
5
	// Méthodes
6
	/**
7
	 * Fonction d'affichage par défaut
8
	 */
97 jpm 9
 
10
 
33 jpm 11
	public function executerActionParDefaut() {
12
		$this->executerAccueil();
13
	}
97 jpm 14
 
33 jpm 15
	public function executerAccueil() {
16
		$donnees = array();
57 delphine 17
		$donnees['form_nom'] = $this->executerFormulaireNom();
18
		$this->afficherAccueil($donnees);
19
	}
97 jpm 20
 
57 delphine 21
	private function afficherAccueil($donnees) {
97 jpm 22
		$donnees['i18n'] = I18n::get('Recherche-accueil');
33 jpm 23
		$this->setSortie(self::RENDU_CORPS, $this->getVue('recherche_accueil', $donnees));
24
	}
97 jpm 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
		}
97 jpm 33
 
34
		$donnees['url_form'] = $this->obtenirUrlBase();
33 jpm 35
		$donnees['i18n'] = I18n::get('Recherche-form-nom');
97 jpm 36
 
33 jpm 37
		return $this->getVue('form_nom', $donnees);
38
	}
97 jpm 39
 
74 delphine 40
	public function executerForm() {
76 delphine 41
		$donnees = Registre::get('donneesMoteur');
57 delphine 42
		$donnees['form_nom'] = $this->executerFormulaireNom($donnees);
43
		$this->afficherAccueil($donnees);
76 delphine 44
		Registre::detruire('donneesMoteur');
33 jpm 45
	}
74 delphine 46
 
97 jpm 47
 
48
 
33 jpm 49
}
50
?>