public function RemplirListe($element, $nomChamp, $liste) { switch ($nomChamp) { case COL_JOUEUR: $id = ''; if ($element !== NULL) { $id = $element[LISTE_ELEMENT_ID]; } $cListe = new CListeJoueursPseudos($this->prefixIdClass, $this->NomListeFormate($nomChamp) . '__' . $id, $this->contexte); $cListe->SetListeParente($this, $id); $mSousListe = new MListeJoueurs(); if ($id !== '') { $mListe = $this->GetSousListeElement($element, $nomChamp); $mSousListe = new MListeJoueurs(); $mSousListe = $mListe->ExtraireListe(COL_JOUEUR); } $cListe->InjecterListeObjetsMetiers($mSousListe, true); $liste->AjouterListe($cListe); } }
<?php require_once 'cst.php'; require_once PATH_METIER . 'mListeJoueurs.php'; require_once PATH_COMPOSANTS . 'cListeJoueursPseudos.php'; if (GDroit::ADroitPopErreur(DROIT_ADMIN) === true) { $prefixIdClass = PIC_ADM; switch (GReferentiel::NomReferentielGeneral($nomReferentiel)) { case 'GradesGlobauxAdmin' . COL_JOUEUR: $mObjet = new MJoueur(); $mObjet->SetObjetFromTableau(GSession::LirePost($nomContexte)); $mObjet->ChargerFromPseudo(); $mListe = new MListeJoueurs(); $mListe->AjouterElement($mObjet); $cListe = new CListeJoueursPseudos($prefixIdClass, $nomReferentiel, $nomContexte); $cListe->SupprimerListeObjetsMetiersFromExistante($mListe); GContexte::AjouterListe($cListe); break; } }
<?php require_once 'cst.php'; require_once PATH_METIER . 'mListeJoueurs.php'; require_once PATH_COMPOSANTS . 'cListeJoueursPseudos.php'; if (GDroit::ADroitPopErreur(DROIT_ADMIN) === true) { $prefixIdClass = PIC_ADM; switch (GReferentiel::NomReferentielGeneral($nomReferentiel)) { case 'GradesGlobauxAdmin' . COL_JOUEUR: $mObjet = new MJoueur(); $mObjet->SetObjetFromTableau(GSession::LirePost($nomContexte)); $mObjet->ChargerFromPseudo(); $mListe = new MListeJoueurs(); $mListe->AjouterElement($mObjet); $cListe = new CListeJoueursPseudos($prefixIdClass, $nomReferentiel, $nomContexte); $cListe->AjouterListeObjetsMetiersToExistante($mListe); GContexte::AjouterListe($cListe); break; } }