Rev 41 | Go to most recent revision | Blame | Last modification | View Log | RSS feed
<?php
global $gBlock;
function pattern1($donnees)
{
echo "<H1>Liste des noms</H1>";
echo "radical: $donnees['radical']</br>";
echo '</br>';
}
function pattern2($donnees)
{
echo "<li>Nom:$donnees['intitule.eni_intitule_nom']</li>";
}
class liste_nom_latin_xhtml implements iVue {
protected $leBlock;
function __construct($unBlock)
{
$this->leBlock = $unBlock;
}
function serialiser2()
{
echo '<h2>Test</h3>';
$this->leBlock->afficherPattern('FICHE_LISTE_NOMS','pattern1');
echo '<OL>';
$this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_SELECTION','pattern2');
echo '</OL>';
}
function serialiser()
{
$gBlock = $this->leBlock;
$retour = '';
$retour .= '<h3>'.'Test'.'</h3>';
$retour .= '<ol>';
$donnees = $this->leBlock->recupererDonnees();
foreach ($donnees as $cle => $valeur) {
$retour .= '<li>'.$cle.' : '.$valeur;
}
$retour .= '</ol>';
$block_fils = $this->leBlock->recupererCollectionBlockFils();
for($i = 0; $i < count($block_fils); $i++) {
$collection = $block_fils[$i];
$blocks = $collection->recupererBlocksDeDonnees();
foreach ($blocks as $cle => $valeur) {
$donnees = $valeur->recupererDonnees();
$retour .= '<ol>';
foreach ($donnees as $cle1 => $valeur1) {
$retour .= '<li>'.$cle1.' : '.$valeur1;
}
$retour .= '</ol>';
}
}
echo $retour;
}
}
?>