30,6 → 30,8 |
|
public function obtenirDonnees() { |
$donnees = array(); |
$donnees['nt'] = $this->nomCourant->getNt(); |
$donnees['nomSciRetenu'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html'); |
$donnees['cel'] = $this->getCel(); |
$donnees['photoflora'] = $this->getPhotoFlora(); |
return $donnees; |
54,7 → 56,19 |
$photoflora = array(); |
$this->images->setProjet('photoflora'); |
$nnr = $this->nomCourant->getNnr(); |
$photoflora['images'] = $this->images->getInfosImagesParIdsNoms(array($nnr)); |
$images = $this->images->getInfosImagesParIdsNoms(array($nnr)); |
foreach ($images as $idImg => $img) { |
$infosImg = array(); |
$infosImg['src'] = $img['binaire.href']; |
$infosImg['nomSci'] = $img['determination.nom_sci']; |
$infosImg['station'] = $img['station']; |
$infosImg['date'] = $this->formaterDateImg($img['date']); |
$infosImg['auteur'] = $img['auteur']; |
|
//$infosImg['urlDetailImg'] = $this->appUrls->obtenirUrlPopUpIllustrations($idImg); |
//$infosImg['urlContact'] = $this->appUrls->obtenirUrlPopUpContact($img['auteur.id'], $idImg); |
$photoflora['images'][$idImg] = $infosImg; |
} |
|
$this->meta->setProjet('photoflora'); |
$meta = $this->meta->getMetaDonnees(); |
95,10 → 109,10 |
|
private function formaterDateImg($date) { |
$dateFmt = $date; |
if ($date == '0000-00-00') { |
if ($date == '0000-00-00' || $date == '1970-01-01 01:01:01') { |
$dateFmt = 'inconnue'; |
} else { |
$dateFmt = date('d/m/Y', strtotime($date)); |
$dateFmt = strftime('%e %B %Y', strtotime($date)); |
} |
return $dateFmt; |
} |