Subversion Repositories eFlore/Applications.coel-consultation

Rev

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

Rev 152 Rev 154
Line 35... Line 35...
35
			
35
			
36
		} else {
36
		} else {
37
			// Récupération des données
37
			// Récupération des données
38
			$this->donnees['id'] = $_GET['id'];
38
			$this->donnees['id'] = $_GET['id'];
39
			$this->donnees['info'] = $this->personneDao->getPersonne($this->donnees['id']);
-
 
Line -... Line 39...
-
 
39
			$this->donnees['info'] = $this->personneDao->getPersonne($this->donnees['id']);
-
 
40
			
40
			$this->creerPaginationPublications($this->donnees['id']);
41
			// Création des paginations
41
			
42
			$this->creerPaginationPublications($this->donnees['id']);
Line 42... Line 43...
42
			$this->donnees['collections'] = $this->personneDao->getPersonneACollection($this->donnees['id']);
43
			$this->creerPaginationCollections($this->donnees['id']);
43
			$this->donnees['structures'] = $this->personneDao->getPersonneAStructure($this->donnees['id']);
44
			$this->creerPaginationStructures($this->donnees['id']);
44
			
45
			
45
			// Traitement des données
46
			// Traitement des données
46
			$this->traiterDonneesPersonne($this->donnees['info']);
47
			$this->traiterDonneesPersonne($this->donnees['info']);
47
			$this->traiterDonneesPersonneAPublication($this->donnees['publications']);
48
			$this->traiterDonneesPersonneAPublication($this->donnees['publications']);
48
			$this->traiterDonneesPersonneACollection($this->donnees['collections']);
49
			$this->traiterDonneesPersonneACollection($this->donnees['collections']);
Line 49... Line 50...
49
			$this->traiterDonneesPersonneAStructure($this->donnees['structures']);
50
			$this->traiterDonneesPersonneAStructure($this->donnees['structures']);
50
			$this->postraiterDonnees($this->donnees);
51
			$this->postraiterDonnees($this->donnees);
51
			$this->donnees['metadonnees'] = $this->traiterMetaDonnees($this->donnees['info']);
-
 
52
			
-
 
Line 53... Line 52...
53
			// Création des méta-données de la page
52
			$this->donnees['metadonnees'] = $this->traiterMetaDonnees($this->donnees['info']);
54
			$titre = $this->donnees['info']['cp_fmt_nom_complet'];
53
			
55
			$description = $this->donnees['info']['cp_description'];
-
 
56
			$tags = "Botaniste, naturaliste, personne, id:{$this->donnees['id']}, {$this->donnees['info']['_guid_']}";
-
 
57
			
-
 
58
			// Envoie à la sortie
54
			// Création des méta-données de la page
59
			//Debug::printr($donnees);
55
			$this->definirMetadonneesPageWeb();
60
			$this->setSortie(self::META_TITRE, $titre);
56
			
61
			$this->setSortie(self::META_DESCRIPTION, $description);
57
			// Envoie à la sortie
Line 86... Line 82...
86
		$this->personneDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
82
		$this->personneDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
87
		$this->personneDao->setDistinction(1);
83
		$this->personneDao->setDistinction(1);
88
		$this->donnees['publications'] = $this->personneDao->getPublicationsLiees($id_personne);
84
		$this->donnees['publications'] = $this->personneDao->getPublicationsLiees($id_personne);
89
	}
85
	}
Line -... Line 86...
-
 
86
	
-
 
87
	private function creerPaginationCollections($id_personne) {
-
 
88
		// Gestion du nombre de résultats
-
 
89
		$donnees_total = $this->personneDao->getNbreCollectionsLiees($id_personne);
-
 
90
		
-
 
91
		// Gestion du fragmenteur
-
 
92
		$urlFiche = $this->obtenirObjetUrlFichePersonne($id_personne);
-
 
93
		$options = array(
-
 
94
			'url' => $urlFiche, 
-
 
95
			'donnees_total' => $donnees_total,
-
 
96
			'donnees_par_page' => Config::get('resultat_par_page_defaut'),
-
 
97
			'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
-
 
98
		);
-
 
99
		$fragmenteur = Composant::fabrique('fragmenteur', $options);
-
 
100
		$this->donnees['collectionsFrag'] = $fragmenteur->executer();
-
 
101
		list($de, $a) = $fragmenteur->getDeplacementParPageId();
-
 
102
		$this->url->unsetVariablesRequete(array('page'));
-
 
103
 
-
 
104
		// Gestion de l'accès aux données
-
 
105
		$this->personneDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
-
 
106
		$this->personneDao->setDistinction(1);
-
 
107
		$this->donnees['collections'] = $this->personneDao->getCollectionsLiees($id_personne);
-
 
108
	}
-
 
109
	
-
 
110
	private function creerPaginationStructures($id_personne) {
-
 
111
		// Gestion du nombre de résultats
-
 
112
		$donnees_total = $this->personneDao->getNbreStructuresLiees($id_personne);
-
 
113
		
-
 
114
		// Gestion du fragmenteur
-
 
115
		$urlFiche = $this->obtenirObjetUrlFichePersonne($id_personne);
-
 
116
		$options = array(
-
 
117
			'url' => $urlFiche, 
-
 
118
			'donnees_total' => $donnees_total,
-
 
119
			'donnees_par_page' => Config::get('resultat_par_page_defaut'),
-
 
120
			'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
-
 
121
		);
-
 
122
		$fragmenteur = Composant::fabrique('fragmenteur', $options);
-
 
123
		$this->donnees['structuresFrag'] = $fragmenteur->executer();
-
 
124
		list($de, $a) = $fragmenteur->getDeplacementParPageId();
-
 
125
		$this->url->unsetVariablesRequete(array('page'));
-
 
126
 
-
 
127
		// Gestion de l'accès aux données
-
 
128
		$this->personneDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
-
 
129
		$this->personneDao->setDistinction(1);
-
 
130
		$this->donnees['structures'] = $this->personneDao->getStructuresLiees($id_personne);
-
 
131
	}
90
	
132
	
91
	private function traiterDonneesPersonne(&$donnees) {
133
	private function traiterDonneesPersonne(&$donnees) {
92
		// Liste des préfixes
134
		// Liste des préfixes
93
		Ontologie::chargerListe(1004);
135
		Ontologie::chargerListe(1004);
94
		// Liste des suffixes
136
		// Liste des suffixes
Line 157... Line 199...
157
			$structure['_fonction_'] = $this->construireTxtListeOntologie($structure['csap_ce_truk_fonction']);
199
			$structure['_fonction_'] = $this->construireTxtListeOntologie($structure['csap_ce_truk_fonction']);
158
			$structure['_statut_'] = $this->construireTxtListeOntologie($structure['csap_ce_truk_statut']);
200
			$structure['_statut_'] = $this->construireTxtListeOntologie($structure['csap_ce_truk_statut']);
159
			$structure['_url_'] = $this->obtenirUrlFicheStructure($structure['csap_id_structure']);
201
			$structure['_url_'] = $this->obtenirUrlFicheStructure($structure['csap_id_structure']);
160
		}
202
		}
161
	}
203
	}
-
 
204
	
-
 
205
	private function definirMetadonneesPageWeb() {
-
 
206
		$titre = $this->donnees['info']['cp_fmt_nom_complet'];
-
 
207
		$description = $this->donnees['info']['cp_description'];
-
 
208
		$tags = "Botaniste, naturaliste, personne, id:{$this->donnees['id']}, {$this->donnees['info']['_guid_']}";
-
 
209
		
-
 
210
		// Envoie à la sortie
-
 
211
		$this->setSortie(self::META_TITRE, $titre);
-
 
212
		$this->setSortie(self::META_DESCRIPTION, $description);
-
 
213
		$this->setSortie(self::META_TAGS, $tags);
-
 
214
	}
162
}
215
}
163
216