Subversion Repositories eFlore/Applications.coel-consultation

Compare Revisions

Ignore whitespace Rev 151 → Rev 152

/trunk/controleurs/FichePersonne.php
13,6 → 13,7
*/
class FichePersonne extends Fiche {
private $donnees = array();
//+----------------------------------------------------------------------------------------------------------------+
// Méthodes
/**
26,8 → 27,6
// FICHE PERSONNE
public function afficherPersonne() {
$donnees = array();
 
// Gestion des actions par défaut
$this->executerAction('Recherche', 'chargerMoteurRecherche');
36,24 → 35,25
} else {
// Récupération des données
$donnees['id'] = $_GET['id'];
$donnees['info'] = $this->personneDao->getPersonne($donnees['id']);
$donnees['publications'] = $this->personneDao->getPersonneAPublication($donnees['id']);
$donnees['collections'] = $this->personneDao->getPersonneACollection($donnees['id']);
$donnees['structures'] = $this->personneDao->getPersonneAStructure($donnees['id']);
$this->donnees['id'] = $_GET['id'];
$this->donnees['info'] = $this->personneDao->getPersonne($this->donnees['id']);
$this->creerPaginationPublications($this->donnees['id']);
$this->donnees['collections'] = $this->personneDao->getPersonneACollection($this->donnees['id']);
$this->donnees['structures'] = $this->personneDao->getPersonneAStructure($this->donnees['id']);
// Traitement des données
$this->traiterDonneesPersonne($donnees['info']);
$this->traiterDonneesPersonneAPublication($donnees['publications']);
$this->traiterDonneesPersonneACollection($donnees['collections']);
$this->traiterDonneesPersonneAStructure($donnees['structures']);
$this->postraiterDonnees($donnees);
$donnees['metadonnees'] = $this->traiterMetaDonnees($donnees['info']);
$this->traiterDonneesPersonne($this->donnees['info']);
$this->traiterDonneesPersonneAPublication($this->donnees['publications']);
$this->traiterDonneesPersonneACollection($this->donnees['collections']);
$this->traiterDonneesPersonneAStructure($this->donnees['structures']);
$this->postraiterDonnees($this->donnees);
$this->donnees['metadonnees'] = $this->traiterMetaDonnees($this->donnees['info']);
// Création des méta-données de la page
$titre = $donnees['info']['cp_fmt_nom_complet'];
$description = $donnees['info']['cp_description'];
$tags = "Botaniste, naturaliste, personne, id:{$donnees['id']}, {$donnees['info']['_guid_']}";
$titre = $this->donnees['info']['cp_fmt_nom_complet'];
$description = $this->donnees['info']['cp_description'];
$tags = "Botaniste, naturaliste, personne, id:{$this->donnees['id']}, {$this->donnees['info']['_guid_']}";
// Envoie à la sortie
//Debug::printr($donnees);
60,11 → 60,34
$this->setSortie(self::META_TITRE, $titre);
$this->setSortie(self::META_DESCRIPTION, $description);
$this->setSortie(self::META_TAGS, $tags);
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_personne', $donnees));
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_personne', $this->donnees));
$this->chargerPiedDePage();
}
}
private function creerPaginationPublications($id_personne) {
// Gestion du nombre de résultats
$donnees_total = $this->personneDao->getNbrePublicationsLiees($id_personne);
// Gestion du fragmenteur
$urlFiche = $this->obtenirObjetUrlFichePersonne($id_personne);
$options = array(
'url' => $urlFiche,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$this->donnees['publicationsFrag'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('page'));
 
// Gestion de l'accès aux données
$this->personneDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$this->personneDao->setDistinction(1);
$this->donnees['publications'] = $this->personneDao->getPublicationsLiees($id_personne);
}
private function traiterDonneesPersonne(&$donnees) {
// Liste des préfixes
Ontologie::chargerListe(1004);
/trunk/controleurs/aControleur.php
407,10 → 407,15
}
protected function obtenirUrlFichePersonne($id_personne) {
$url = $this->obtenirObjetUrlFichePersonne($id_personne);
return $url->getURL();
}
protected function obtenirObjetUrlFichePersonne($id_personne) {
$this->url->setRequete(false);
$this->url->setVariableRequete('module', 'FichePersonne');
$this->url->setVariableRequete('id', $id_personne);
$url = $this->url->getURL();
$url = clone $this->url;
$this->url->unsetVariablesRequete(array('module', 'id'));
return $url;
}
/trunk/controleurs/Fiche.php
21,7 → 21,7
parent::__construct();
$this->structureDao = new StructureDao();
$this->collectionDao = new CollectionDao();
$this->personneDao = $this->getModele('PersonneDao');
$this->personneDao = new PersonneDao();
}
// +---------------------------------------------------------------------------------------------------------------+