Subversion Repositories eFlore/Applications.coel-consultation

Rev

Rev 114 | Rev 145 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 114 Rev 132
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Classe mère des Controleurs des modules présentant des Fiches.
4
 * Classe mère des Controleurs des modules présentant des Fiches.
5
 *
5
 *
6
 * @package		Collection
6
 * @package		Collection
7
 * @category	Php 5.2
7
 * @category	Php 5.2
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @copyright	2010 Tela-Botanica
9
 * @copyright	2010 Tela-Botanica
10
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
10
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
12
 * @version		SVN: $Id: Fiche.php 114 2010-06-28 09:49:51Z jpm $
12
 * @version		SVN: $Id: Fiche.php 132 2010-07-12 10:25:11Z jpm $
13
 */
13
 */
14
abstract class Fiche extends aControleur {
14
abstract class Fiche extends aControleur {
15
	
15
	
16
	protected $structureDao = null;
16
	protected $structureDao = null;
17
	protected $collectionDao = null;
17
	protected $collectionDao = null;
18
	protected $personneDao = null;
18
	protected $personneDao = null;
19
	
19
	
20
	public function __construct()  {
20
	public function __construct()  {
21
		parent::__construct();
21
		parent::__construct();
22
		$this->structureDao = $this->getModele('StructureDao');
22
		$this->structureDao = $this->getModele('StructureDao');
23
		$this->collectionDao = $this->getModele('CollectionDao');
23
		$this->collectionDao = $this->getModele('CollectionDao');
24
		$this->personneDao = $this->getModele('PersonneDao');
24
		$this->personneDao = $this->getModele('PersonneDao');
25
	}
25
	}
26
	
26
	
27
	// +---------------------------------------------------------------------------------------------------------------+
27
	// +---------------------------------------------------------------------------------------------------------------+
28
	// MÉTHODES GÉNÉRIQUES
28
	// MÉTHODES GÉNÉRIQUES
29
	
29
	
30
	protected function obtenirNomCompletPersonne($personne_id) {
30
	protected function obtenirNomCompletPersonne($personne_id) {
31
		$personne_nom = $this->personneDao->getPersonneNomComplet($personne_id);
31
		$personne_nom = $this->personneDao->getPersonneNomComplet($personne_id);
32
		return $personne_nom;
32
		return $personne_nom;
33
	}
33
	}
34
	
34
	
35
	protected function obtenirCourrielsPersonne($personne_id) {
35
	protected function obtenirCourrielsPersonne($personne_id) {
36
		$courriels = $this->personneDao->getPersonneCourriels($personne_id);
36
		$courriels = $this->personneDao->getPersonneCourriels($personne_id);
37
		$courriels = $this->traiterTxtTruck($courriels);
37
		$courriels = $this->traiterTxtTruck($courriels);
38
		$courriels = $this->formaterCourriels($courriels);
38
		$courriels = $this->formaterCourriels($courriels);
39
		return $courriels;
39
		return $courriels;
40
	}
40
	}
41
	
41
	
42
	protected function traiterDonneesElementAPublication(&$publications) {
42
	protected function traiterDonneesElementAPublication(&$publications) {
43
		foreach ($publications as &$publication) {
43
		foreach ($publications as &$publication) {
44
			$publication['_editeur_'] = $this->construireTxtTruck($publication['cpu_ce_truk_editeur']);
44
			$publication['_editeur_'] = $this->construireTxtTruck($publication['cpu_ce_truk_editeur']);
45
			$publication['_date_parution_'] = rtrim($publication['cpu_date_parution'],'-00-00');
45
			$publication['_date_parution_'] = rtrim($publication['cpu_date_parution'],'-00-00');
46
		}
46
		}
47
	}
47
	}
48
	
48
	
49
	protected function traiterMetaDonnees(&$donnees) {
49
	protected function traiterMetaDonnees(&$donnees) {
50
		$meta = array();
50
		$meta = array();
51
		$meta['_guid_'] = $donnees['_guid_'];
51
		$meta['_guid_'] = $donnees['_guid_'];
-
 
52
		$meta['_guid_url_'] = $this->obtenirPermalienGuid($donnees['_guid_']);
52
		$meta['_notes_'] = $donnees['cmhl_notes'];
53
		$meta['_notes_'] = $donnees['cmhl_notes'];
53
		$meta['_source_'] = $donnees['cmhl_source'];
54
		$meta['_source_'] = $donnees['cmhl_source'];
54
		$meta['_date_modification_'] = $donnees['cmhl_date_modification'];
55
		$meta['_date_modification_'] = $donnees['cmhl_date_modification'];
55
		$meta['_modifier_par_'] = $this->obtenirNomCompletPersonne($donnees['cmhl_ce_modifier_par']);
56
		$meta['_modifier_par_'] = $this->obtenirNomCompletPersonne($donnees['cmhl_ce_modifier_par']);
56
		$meta['_modifier_par_courriel_'] = $this->obtenirCourrielsPersonne($donnees['cmhl_ce_modifier_par']);
57
		$meta['_modifier_par_courriel_'] = $this->obtenirCourrielsPersonne($donnees['cmhl_ce_modifier_par']);
57
		$meta['_etat_'] = $this->construireTxtListeOntologie($donnees['cmhl_ce_etat']);
58
		$meta['_etat_'] = $this->construireTxtListeOntologie($donnees['cmhl_ce_etat']);
58
		return $this->getVue('metadonnees', $meta);
59
		return $this->getVue('metadonnees', $meta);
59
	}
60
	}
60
}
61
}