39,8 → 39,8 |
$this->donnees['id'] = $_GET['id']; |
$this->donnees['info'] = $this->collectionDao->getCollection($this->donnees['id']); |
$this->creerPaginationPersonnes($this->donnees['id']); |
$this->donnees['publications'] = $this->collectionDao->getPublicationsLiees($this->donnees['id']); |
$this->donnees['commentaires'] = $this->collectionDao->getCommentairesLies($this->donnees['id']); |
$this->creerPaginationPublications($this->donnees['id']); |
$this->creerPaginationCommentaires($this->donnees['id']); |
|
// Traitements des données |
$this->traiterDonneesCollection($this->donnees['info']); |
91,6 → 91,52 |
$this->donnees['personnes'] = $this->collectionDao->getPersonnesLiees($id_collection); |
} |
|
private function creerPaginationPublications($id_collection) { |
// Gestion du nombre de résultats |
$donnees_total = $this->collectionDao->getNbrePublicationsLiees($id_collection); |
|
// Gestion du fragmenteur |
$urlFiche = $this->obtenirObjetUrlFicheCollection($id_collection); |
$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->collectionDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage()); |
$this->collectionDao->setDistinction(1); |
$this->donnees['publications'] = $this->collectionDao->getPublicationsLiees($id_collection); |
} |
|
private function creerPaginationCommentaires($id_collection) { |
// Gestion du nombre de résultats |
$donnees_total = $this->collectionDao->getNbreCommentairesLies($id_collection); |
|
// Gestion du fragmenteur |
$urlFiche = $this->obtenirObjetUrlFicheCollection($id_collection); |
$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['commentairesFrag'] = $fragmenteur->executer(); |
list($de, $a) = $fragmenteur->getDeplacementParPageId(); |
$this->url->unsetVariablesRequete(array('page')); |
|
// Gestion de l'accès aux données |
$this->collectionDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage()); |
$this->collectionDao->setDistinction(1); |
$this->donnees['commentaires'] = $this->collectionDao->getCommentairesLies($id_collection); |
} |
|
private function traiterDonneesCollection(&$donnees) { |
// liste 29 : Liste des types de collection dans le standard NCD |
Ontologie::chargerListe(1032); |