Subversion Repositories Applications.referentiel

Rev

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

Rev Author Line No. Line
295 aurelien 1
<?php
2
// declare(encoding='UTF-8');
3
/**
4
 * Classe Arbre du module Consultation.
5
 * Permet de consultater un référentiel sous forme d'arbre
6
 *
7
 * @package		Referentiel
8
 * @category	Php5.2
9
 * @author		Aurélien PERONNET <aurelien@tela-botanica.org>
10
 * @copyright	2010 Tela-Botanica
11
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
12
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
13
 * @version		SVN: $Id$
14
 */
15
class Arbre extends AppliControleur {
16
 
17
	private $referentiel = null;
18
 
19
	public function __construct()  {
20
		parent::__construct();
21
 
22
		// Récupération de paramêtres
23
		if (isset($_GET['ref'])) { // code du projet courrant
24
			$this->referentiel = strtolower($_GET['ref']);
25
		}
26
	}
27
 
28
	//+----------------------------------------------------------------------------------------------------------------+
29
	// Méthodes
30
	/**
31
	 * Fonction d'affichage par défaut
32
	 */
33
	public function executerActionParDefaut() {
34
		$this->definirCommeModulePrincipal(get_class($this));
35
		$this->construireMenu($this->referentiel);
36
		$this->construireFilAriane($this->referentiel);
37
		$this->executerActionReferentiel('Arbre', 'afficherArbre', $this->referentiel, 20);
38
	}
39
 
40
	public function afficherArbre() {
41
		$donnees = array();
42
		$rechercheDao =  new RechercheDao();
43
		$parametres = array('mots' => '*',
44
							'ref' => $this->referentiel,
45
							'rg' => 180);
46
		$donnees['resultats'] = $rechercheDao->chercher('ParDefaut', $parametres);
47
		$donnees['url_service_tpl'] = Config::get('url_jrest');
48
		$donnees['url_fiche_taxon_tpl'] = $this->obtenirUrlFicheTaxon($this->referentiel, '%s');
49
		$donnees['referentiel'] = $this->referentiel;
50
		$resultat = $this->getVue('arbre_taxon', $donnees);
51
		$this->setSortie(self::RENDU_CORPS, $resultat);
52
	}
53
}
54
?>