예제 #1
0
<div id="contenu">
-->
<h2>Test unitaire - affichage d'une oeuvre</h2>
<div id="contenu">
<?php 
$idOeuvre = 3;
$langue = "FR";
$oeuvre = new Oeuvre();
$oeuvreAffichee = $oeuvre->getOeuvreById($idOeuvre, $langue);
echo "<h3>informations sur l'oeuvre</h3>";
echo "<details>";
echo '<summary>Oeuvre::getOeuvreById($idOeuvre = ' . $idOeuvre . ', $langue = ' . $langue . ')</summary>';
var_dump($oeuvreAffichee);
echo "</details>";
$commentaire = new Commentaire();
$commentairesOeuvre = $commentaire->getCommentairesByOeuvre($idOeuvre, $langue);
echo "<h3>commentaires sur l'oeuvre</h3>";
echo "<details>";
echo '<summary>Commentaire::getCommentairesByOeuvre = ' . $idOeuvre . ', $langue = ' . $langue . ')</summary>';
var_dump($commentairesOeuvre);
echo "</details>";
$photo = new Photo();
$photosOeuvre = $photo->getPhotosByOeuvre($idOeuvre);
echo "<h3>photos associées à l'oeuvre</h3>";
echo "<details>";
echo '<summary>Photo::getPhotosByOeuvre($idOeuvre = ' . $idOeuvre . ')</summary>';
var_dump($photosOeuvre);
echo "</details>";
?>
</div>
예제 #2
0
 /**
  * @brief Méthode qui appelle la vue d'affichage de la page d'une oeuvre qui n'a pas encore été approuvée - pour les utilisateurs admin
  * @access private
  * @return void
  */
 private function oeuvreSoumise()
 {
     $oeuvre = new Oeuvre();
     $oeuvreAffichee = $oeuvre->getAnyOeuvreById($_GET["o"]);
     $commentaire = new Commentaire();
     $commentairesOeuvre = $commentaire->getCommentairesByOeuvre($_GET["o"], $this->langueAffichage);
     $photo = new Photo();
     $photosOeuvre = $photo->getPhotosByOeuvre($_GET["o"], false);
     $artiste = new Artiste();
     $artistesOeuvre = $artiste->getArtistesbyOeuvreId($_GET["o"]);
     $this->oVue = new VueOeuvreSoumise();
     $this->oVue->setDataGlobal('oeuvreSoumise', "page d'une oeuvre soumise", $this->langueAffichage, $this->pOeuvreSoumise);
     $this->oVue->setData($oeuvreAffichee, $commentairesOeuvre, $photosOeuvre, $artistesOeuvre, $this->langueAffichage);
     $this->oVue->afficherMeta();
     $this->oVue->afficherEntete();
     $this->oVue->afficherBody();
     $this->oVue->afficherPiedPage();
 }