Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1108 Rev 1115
Line 27... Line 27...
27
		$this->nomCourant = $this->conteneur->getNomCourant();
27
		$this->nomCourant = $this->conteneur->getNomCourant();
28
		$this->referentiel = $this->conteneur->getParametre('referentiel');
28
		$this->referentiel = $this->conteneur->getParametre('referentiel');
29
		$this->images = $this->conteneur->getApiImages();
29
		$this->images = $this->conteneur->getApiImages();
30
		$this->appUrls = $this->conteneur->getAppUrls();
30
		$this->appUrls = $this->conteneur->getAppUrls();
31
		$this->meta = $this->conteneur->getApiMetaDonnees();
31
		$this->meta = $this->conteneur->getApiMetaDonnees();
-
 
32
 
-
 
33
		$this->images->setApi(Images::API_DEL);
32
	}
34
	}
Line 33... Line 35...
33
 
35
 
34
	public function getDonnees() {
36
	public function getDonnees() {
35
		$this->donnees = array();
37
		$this->donnees = array();
Line 41... Line 43...
41
 
43
 
42
		return $this->donnees;
44
		return $this->donnees;
Line 43... Line 45...
43
	}
45
	}
44
 
-
 
45
	public function getPhotos() {
46
 
46
		$url_picto = $this->obtenirUrlPicto();
-
 
47
		$obj = json_decode(file_get_contents($url_picto), true);
-
 
48
 
-
 
49
		$listePhotos = $obj['resultats'];
47
	public function getPhotos() {
50
		//echo '<pre>'.print_r($obj, true).'</pre>';
48
		$listePhotos = $this->images->getInfosImagesGalerieMobile($this->nomCourant->getNnr());
51
		foreach($listePhotos as $index) {
49
		foreach($listePhotos as $index) {
52
			$this->formaterListePhotos($index);
50
			$this->formaterListePhotos($index);
Line 53... Line -...
53
		}
-
 
54
	}
-
 
55
 
-
 
56
 
-
 
57
	public function obtenirUrlPicto() {
-
 
58
		//TODO : passer les valeurs dans le fichier de config
-
 
59
		$url_picto = "http://www.tela-botanica.org/eflore/del/services/0.1/images?navigation.depart=0"
-
 
60
					."&navigation.limite=4&masque.nn=".$this->nomCourant->getNnr()
-
 
61
					."&tri=votes&ordre=desc&protocole=3&format=CRS";
-
 
62
 
-
 
63
		return ($url_picto);
51
		}
64
	}
52
	}
Line 65... Line 53...
65
 
53
 
66
	private function formaterListePhotos($images) {
54
	private function formaterListePhotos($images) {
Line 108... Line 96...
108
		if ($projet != "") {
96
		if ($projet != "") {
109
			$dessin = array();
97
			$dessin = array();
110
			$tax = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
98
			$tax = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
111
			$this->images->setProjet($projet);
99
			$this->images->setProjet($projet);
112
			$this->images->setNnTaxon($tax);
100
			$this->images->setNnTaxon($tax);
113
			$costeImg = $this->images->getInfosImagesTaxons();
101
			$costeImg = $this->images->setApi(Eflore::API_EFLORE)->getInfosImagesTaxons();
-
 
102
			$this->images->setApi(Eflore::API_DEL);
Line 114... Line 103...
114
 
103
 
115
			if (count($costeImg) != 0) {
104
			if (count($costeImg) != 0) {
116
				$img['src'] = $costeImg[key($costeImg)]['binaire.href'];
105
				$img['src'] = $costeImg[key($costeImg)]['binaire.href'];
117
				$img['legende']['titre'] = "Illustration de Coste";
106
				$img['legende']['titre'] = "Illustration de Coste";