Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 959 | Rev 1053 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 959 Rev 964
Line 30... Line 30...
30
		$this->meta = $this->conteneur->getApiMetaDonnees();
30
		$this->meta = $this->conteneur->getApiMetaDonnees();
31
		$this->appUrls = $this->conteneur->getAppUrls();
31
		$this->appUrls = $this->conteneur->getAppUrls();
32
	}
32
	}
Line 33... Line 33...
33
 
33
 
34
	public function obtenirDonnees() {
34
	public function obtenirDonnees() {
-
 
35
		$this->getNomsVernaculaires('.referentielVerna');
35
		$this->getNomsVernaculaires();
36
		$this->getNomsVernaculaires('.referentielVernaGrec');
36
		$this->getChorologie();
37
		$this->getChorologie();
37
		$this->donnees['wikini'] = $this->getWikini();
38
		$this->donnees['wikini'] = $this->getWikini();
38
		return $this->donnees;
39
		return $this->donnees;
Line 39... Line 40...
39
	}
40
	}
40
 
41
 
41
	private function getNomsVernaculaires() {
42
	private function getNomsVernaculaires($projet) {
42
		$projet = Config::get($this->referentiel.'.referentielVerna');
43
		$projet = Config::get($this->referentiel.$projet);
43
		if ($projet != "") {
44
		if ($projet != "") {
44
			$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
45
			$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
45
			$nomsVerna = $this->nomsVernaculaires->getRechercheComplete($nt);
46
			$nomsVerna = $this->nomsVernaculaires->getRechercheComplete($projet, $nt);
46
			$this->donnees[$projet]['noms'] = $nomsVerna['resultat'];
47
			$this->donnees[$projet]['noms'] = $nomsVerna['resultat'];
47
			$this->meta->setProjet($projet);
48
			$this->meta->setProjet($projet);
48
			$meta = $this->meta->getMetaDonnees();
49
			$meta = $this->meta->getMetaDonnees();
Line 52... Line 53...
52
		}
53
		}
53
	}
54
	}
Line 54... Line 55...
54
	
55
	
55
	public function getBloc() {
56
	public function getBloc() {
-
 
57
		$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
-
 
58
		$projet = Config::get($this->referentiel.'.referentielVerna');
56
		$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
59
		if ($projet != "") {
57
		$nomsVerna = $this->nomsVernaculaires->getRechercheLimitee($nt);
60
			$nomsVerna = $this->nomsVernaculaires->getRechercheLimitee($projet, $nt);
58
		$this->donnees['nomsVerna'] = (isset($nomsVerna['resultat']) && is_array($nomsVerna['resultat'])) ? array_slice($nomsVerna['resultat'], 0, 3) : array();
61
			$this->donnees['nomsVerna'] = (isset($nomsVerna['resultat']) && is_array($nomsVerna['resultat'])) ? array_slice($nomsVerna['resultat'], 0, 3) : array();
-
 
62
			$this->donnees['autresNomsVerna'] = count($nomsVerna['resultat']) - 3;
59
		$this->donnees['autresNomsVerna'] = count($nomsVerna['resultat']) - 3;
63
		}
60
		$this->donnees['wikini'] = $this->getWikini();
64
		$this->donnees['wikini'] = $this->getWikini();
61
		return $this->donnees;
65
		return $this->donnees;
Line 62... Line 66...
62
	}
66
	}