Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 290 → Rev 291

/trunk/modules/fiche/formateurs/Illustrations.php
13,16 → 13,45
* @version $Id$
*/
class Illustrations extends aControleur {
private $imagesCel = null;
public function __construct(Images $images = null) {
$this->imagesCel = (is_null($images)) ? new Images('cel') : $images;
 
private $conteneur = null;
private $nomCourrant = null;
private $images = null;
private $meta = null;
 
public function __construct(Conteneur $conteneur) {
$this->conteneur = $conteneur;
$this->nomCourrant = $this->conteneur->getNomCourrant();
$this->images = $this->conteneur->getApiImages();
$this->appUrls = $this->conteneur->getAppUrls();
}
public function obtenirDonnees($num_nom) {
$urls = $this->imagesCel->getUrlsImagesParIdsNoms(array($num_nom));
$donnees['img'] = $urls['bdtfx.'.$num_nom];
 
public function obtenirDonnees() {
$donnees = array();
$donnees['cel'] = $this->getCel();
return $donnees;
}
 
public function getBloc() {
// Trop long, il faut un service spécial...
/*
$this->images->setProjet('cel');
$nns = $this->nomCourrant->getNns();
$urls = $this->images->getUrlsImagesParIdsNoms(array($nns));
$donnees['imageUrl'] = $urls["bdtfx.$nns"][0];
*/
return $donnees;
}
 
public function getCel() {
$cel = array();
$this->images->setProjet('cel');
$nns = $this->nomCourrant->getNns();
$urls = $this->images->getUrlsImagesParIdsNoms(array($nns));
$cel['imagesUrl'] = $urls["bdtfx.$nns"];
 
$cel['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('cel');
return $cel;
}
}
?>