protected function InitialiserReferentielsElement($element) { $mObjet = $element[LISTE_ELEMENT_OBJET]; $mListeJeux = new MListeJeux(); $mJeu = new MJeu(); $mJeu->Id($mObjet->Jeu()->Id()); $mJeu->Libelle($mObjet->Jeu()->Libelle()); $mListeJeux->AjouterElement($mJeu); $this->AjouterReferentielElement($element, array(COL_JEU, COL_ID), $mListeJeux, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); $mListeServeurs = new MListeServeurs(); $mListeServeurs->AjouterColSelection(COL_ID); $mListeServeurs->AjouterColSelection(COL_LIBELLE); $mListeServeurs->AjouterFiltreEgal(COL_JEU, $mObjet->Jeu()->Id()); $this->AjouterReferentielElement($element, array(COL_SERVEUR, COL_ID), $mListeServeurs, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE))); $mListeTypesGroupes = new MListeTypesGroupes(); $mListeTypesGroupes->AjouterColSelection(COL_ID); $mListeTypesGroupes->AjouterColSelection(COL_LIBELLE); $mListeTypesGroupes->AjouterFiltreEgal(COL_JEU, $mObjet->Jeu()->Id()); $this->AjouterReferentielElement($element, array(COL_TYPEGROUPE, COL_ID), $mListeTypesGroupes, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE))); }
$mListe = new MListeJeux(); $mListe->AjouterColSelection(COL_ID); $mListe->AjouterColSelection(COL_LIBELLE); $mListe->AjouterColOrdre(COL_LIBELLE); $mListe->AjouterFiltreLike(COL_LIBELLE, '%' . $valeur . '%'); if ($valeur != NULL) { $mListe->Charger(20); } GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); break; case 'Groupes' . COL_SERVEUR . ',' . COL_ID: $jeu = GContexte::LireVariablePost($nomContexte, COL_JEU . ',' . COL_ID); $mListe = new MListeServeurs(); if ($jeu !== NULL) { $mListe->AjouterColSelection(COL_ID); $mListe->AjouterColSelection(COL_LIBELLE); $mListe->AjouterColOrdre(COL_LIBELLE); $mListe->AjouterFiltreEgal(COL_JEU, $jeu); $mListe->Charger(); } GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); break; case 'Groupes' . COL_TYPEGROUPE . ',' . COL_ID: $jeu = GContexte::LireVariablePost($nomContexte, COL_JEU . ',' . COL_ID); $mListe = new MListeTypesGroupes(); if ($jeu !== NULL) { $mListe->AjouterColSelection(COL_ID); $mListe->AjouterColSelection(COL_LIBELLE); $mListe->AjouterColOrdre(COL_LIBELLE);
if ($jeuId == NULL) { $dejaCharge = true; } $mListeJeux = new MListeCommunautes(); $mListeJeux->AjouterColSelection(COL_ID); $mListeJeux->AjouterColSelection(COL_LIBELLE); $mListeJeux->AjouterColOrdre(COL_LIBELLE); if ($jeuId != NULL) { $mJeu = new MJeu(); $mJeu->Id($jeuId); $mJeu->Libelle(GSession::Jeu(COL_LIBELLE)); $mListeJeux->AjouterElement($mJeu); } GReferentiel::AjouterReferentiel(COL_JEU, $mListeJeux, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); $mListeServeurs = new MListeServeurs(); $mListeServeurs->AjouterColSelection(COL_ID); $mListeServeurs->AjouterColSelection(COL_LIBELLE); $mListeServeurs->AjouterColOrdre(COL_LIBELLE); $mListeServeurs->AjouterFiltreEgal(COL_JEU, $jeuId); $mListeServeurs->AjouterFiltreDifferent(COL_SUPPRIME, true); GReferentiel::AjouterReferentiel(COL_SERVEUR, $mListeServeurs, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), $dejaCharge); $mListeTypesGroupes = new MListeTypesGroupes(); $mListeTypesGroupes->AjouterColSelection(COL_ID); $mListeTypesGroupes->AjouterColSelection(COL_LIBELLE); $mListeTypesGroupes->AjouterColOrdre(COL_LIBELLE); $mListeTypesGroupes->AjouterFiltreEgal(COL_JEU, $jeuId); GReferentiel::AjouterReferentiel(COL_TYPEGROUPE, $mListeTypesGroupes, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), $dejaCharge); $org = new SOrganiseur(2, 1, true); $elem = new SElement($prefixIdClass . CLASSTEXTE_INFO); $elem->AjouterClasse(CLASSTEXTE_INFO); $elem->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_GPE_NOUVGPEDESC, false, true)));