PHP code example of lyssal / collection-bundle

1. Go to this page and download the library: Download lyssal/collection-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lyssal / collection-bundle example snippets


namespace Acme\CollectionBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class AcmeCollectionBundle extends Bundle
{
    public function getParent()
    {
        return 'LyssalCollectionBundle';
    }
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\Element as ElementBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * Type de collection.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_element")
 */
class Element extends ElementBase
{
    /**
     * @var \Acme\CollectionBundle\Entity\Illustration
     *
     * @ORM\OneToOne(targetEntity="Illustration", inversedBy="rectoElement", cascade={"persist"})
     * @ORM\JoinColumn(name="illustration_recto_id", referencedColumnName="illustration_id", nullable=true, onDelete="SET NULL")
     */
    protected $illustrationRecto;

    /**
     * @var \Acme\CollectionBundle\Entity\Illustration
     *
     * @ORM\OneToOne(targetEntity="Illustration", inversedBy="versoElement", cascade={"persist"})
     * @ORM\JoinColumn(name="illustration_verso_id", referencedColumnName="illustration_id", nullable=true, onDelete="SET NULL")
     */
    protected $illustrationVerso;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Element
     *
     * @ORM\ManyToMany(targetEntity="Element", inversedBy="enfants")
     * @ORM\JoinTable
     * (
     *  name="lyssal_collection_element_a_element_parent",
     *  joinColumns={@ORM\JoinColumn(name="element_parent_id", referencedColumnName="element_id", onDelete="CASCADE")},
     *  inverseJoinColumns={@ORM\JoinColumn(name="element_id", referencedColumnName="element_id", onDelete="CASCADE")}
     * )
     */
    protected $parents;
    
    /**
     * @var \Doctrine\Common\Collections\Collection 
     * 
     * @ORM\ManyToMany(targetEntity="Element", mappedBy="parents")
     */
    protected $enfants;
    
    /**
     * @var \Doctrine\Common\Collections\Collection 
     *
     * @ORM\ManyToMany(targetEntity="\Acme\GeographieBundle\Entity\Pays", inversedBy="elements")
     * @ORM\JoinTable
     * (
     *  name="acme_element_a_origine",
     *  joinColumns={@ORM\JoinColumn(name="element_id", referencedColumnName="element_id", onDelete="CASCADE")},
     *  inverseJoinColumns={@ORM\JoinColumn(name="pays_id", referencedColumnName="pays_id", onDelete="CASCADE")}
     * )
     */
    protected $origines;
    
    /**
     * @var \Doctrine\Common\Collections\Collection 
     *
     * @ORM\OneToMany(targetEntity="ElementDate", mappedBy="element", cascade={"persist"}, orphanRemoval=true)
     */
    protected $elementDates;
    
    /**
     * @var \Doctrine\Common\Collections\Collection 
     *
     * @ORM\OneToMany(targetEntity="ElementPrix", mappedBy="element", cascade={"persist"}, orphanRemoval=true)
     */
    protected $elementPrix;
    
    /**
     * @var \Doctrine\Common\Collections\Collection 
     * 
     * @ORM\OneToMany(targetEntity="ElementSociete", mappedBy="element", cascade={"persist"}, orphanRemoval=true)
     */
    protected $elementSocietes;
    
    /**
     * @var \Doctrine\Common\Collections\Collection 
     * 
     * @ORM\OneToMany(targetEntity="ElementPersonne", mappedBy="element", cascade={"persist"}, orphanRemoval=true)
     */
    protected $elementPersonnes;
    
    /**
     * @var \Doctrine\Common\Collections\Collection 
     * 
     * @ORM\OneToMany(targetEntity="Illustration", mappedBy="element", cascade={"persist"}, orphanRemoval=true)
     */
    protected $illustrations;
    
    /**
     * @var \Doctrine\Common\Collections\Collection 
     * 
     * @ORM\OneToMany(targetEntity="ElementSupport", mappedBy="element", cascade={"persist"})
     */
    protected $elementSupports;
}

namespace Acme\CollectionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Lyssal\CollectionBundle\Entity\ElementDate as ElementDateBase;

/**
 * Date d'un élément.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_element_a_date", uniqueConstraints={@ORM\UniqueConstraint(name="ELEMENT_PAYS", columns={"element_id", "pays_id"})})
 */
class ElementDate extends ElementDateBase
{
    /**
     * @var \Acme\CollectionBundle\Entity\Element
     * 
     * @ORM\ManyToOne(targetEntity="Element", inversedBy="elementDates")
     * @ORM\JoinColumn(name="element_id", referencedColumnName="element_id", nullable=false, onDelete="CASCADE")
     */
    protected $element;
    
    /**
     * @var \Acme\GeographieBundle\Entity\Pays
     * 
     * @ORM\ManyToOne(targetEntity="\Acme\GeographieBundle\Entity\Pays", inversedBy="elementDates")
     * @ORM\JoinColumn(name="pays_id", referencedColumnName="pays_id", nullable=false, onDelete="CASCADE")
     */
    protected $pays;
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\ElementGroupe as ElementGroupeBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * Groupe d'éléments.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_element_groupe")
 */
class ElementGroupe extends ElementGroupeBase
{
    
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\ElementPersonne as ElementPersonneBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * Élément a personne.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_element_a_personne")
 */
class ElementPersonne extends ElementPersonneBase
{
    /**
     * @var \Acme\CollectionBundle\Entity\Element
     * 
     * @ORM\ManyToOne(targetEntity="Element", inversedBy="elementPersonnes")
     * @ORM\JoinColumn(name="element_id", referencedColumnName="element_id", nullable=true, onDelete="CASCADE")
     */
    protected $element;

    /**
     * @var \Acme\CollectionBundle\Entity\Personne
     * 
     * @ORM\ManyToOne(targetEntity="Personne", inversedBy="elementPersonnes", cascade={"persist"})
     * @ORM\JoinColumn(name="personne_id", referencedColumnName="personne_id", nullable=false, onDelete="CASCADE")
     */
    protected $personne;
    
    /**
     * @var \Acme\CollectionBundle\Entity\PersonneRole
     * 
     * @ORM\ManyToOne(targetEntity="PersonneRole", inversedBy="elementPersonnes")
     * @ORM\JoinColumn(name="personne_role_id", referencedColumnName="personne_role_id", nullable=false, onDelete="CASCADE")
     */
    private $personneRole;
}

namespace Acme\CollectionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Lyssal\CollectionBundle\Entity\ElementPrix as ElementPrixBase;

/**
 * Prix d'un élément.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_element_a_prix")
 */
class ElementPrix extends ElementPrixBase
{
    /**
     * @var \Acme\CollectionBundle\Entity\Element
     * 
     * @ORM\ManyToOne(targetEntity="Element", inversedBy="elementPrix")
     * @ORM\JoinColumn(name="element_id", referencedColumnName="element_id", nullable=false, onDelete="CASCADE")
     */
    protected $element;
    
    /**
     * @var \Acme\GeographieBundle\Entity\Pays
     * 
     * @ORM\ManyToOne(targetEntity="\Acme\GeographieBundle\Entity\Pays", inversedBy="elementPrix")
     * @ORM\JoinColumn(name="pays_id", referencedColumnName="pays_id", nullable=false, onDelete="CASCADE")
     */
    protected $pays;
    
    /**
     * @var \Acme\MonnaieBundle\Entity\Monnaie
     * 
     * @ORM\ManyToOne(targetEntity="\Acme\MonnaieBundle\Entity\Monnaie", inversedBy="elementPrix")
     * @ORM\JoinColumn(name="monnaie_id", referencedColumnName="monnaie_id", nullable=false, onDelete="CASCADE")
     */
    protected $monnaie;
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\ElementSociete as BaseElementSociete;
use Doctrine\ORM\Mapping as ORM;

/**
 * Élément a société.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_element_a_societe", uniqueConstraints={@ORM\UniqueConstraint(name="ELEMENT_SOCIETE_SOCIETEROLE", columns={"element_id", "societe_id", "societe_role_id"})})
 */
class ElementSociete extends BaseElementSociete
{
    /**
     * @var \Acme\CollectionBundle\Entity\Element
     * 
     * @ORM\ManyToOne(targetEntity="Element", inversedBy="elementSocietes")
     * @ORM\JoinColumn(name="element_id", referencedColumnName="element_id", nullable=true, onDelete="CASCADE")
     */
    protected $element;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Societe
     * 
     * @ORM\ManyToOne(targetEntity="Societe", inversedBy="elementSocietes")
     * @ORM\JoinColumn(name="societe_id", referencedColumnName="societe_id", nullable=false, onDelete="CASCADE")
     */
    protected $societe;
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\ElementSupport as ElementSupportBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * Élément a support.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_element_a_support")
 */
class ElementSupport extends ElementSupportBase
{
    /**
     * // Ceci est un exemple, utilisez l'utilisateur souhaité (LyssalUtilisateur, FOSUser, etc)
     * @var \Acme\UtilisateurBundle\Entity\Utilisateur
     *
     * @ORM\ManyToOne(targetEntity="\Acme\UtilisateurBundle\Entity\Utilisateur", inversedBy="elementSupports")
     * @ORM\JoinColumn(name="utilisateur_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
     */
    protected $utilisateur;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Element
     *
     * @ORM\ManyToOne(targetEntity="Element", inversedBy="elementSupports", cascade={"persist"})
     * @ORM\JoinColumn(name="element_id", referencedColumnName="element_id", nullable=false, onDelete="CASCADE")
     */
    protected $element;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Support
     *
     * @ORM\ManyToOne(targetEntity="Support", inversedBy="elementSupports")
     * @ORM\JoinColumn(name="support_id", referencedColumnName="support_id", nullable=true, onDelete="CASCADE")
     */
    protected $support;
    
    /**
     * @var \Acme\CollectionBundle\Entity\UtilisateurSupport
     *
     * @ORM\ManyToOne(targetEntity="UtilisateurSupport", inversedBy="elementSupports")
     * @ORM\JoinColumn(name="utilisateur_support_id", referencedColumnName="utilisateur_support_id", nullable=true, onDelete="CASCADE")
     */
    protected $utilisateurSupport;
    
    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\OneToMany(targetEntity="ElementSupportLangue", mappedBy="elementSupport", cascade={"persist"})
     */
    protected $langues;
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\ElementSupportLangue as ElementSupportLangueBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity()
 * @ORM\Table(name="acme_element_a_support_a_langue")
 */
class ElementSupportLangue extends ElementSupportLangueBase
{
    /**
     * @var \Acme\CollectionBundle\Entity\ElementSupport
     *
     * @ORM\ManyToOne(targetEntity="ElementSupport", inversedBy="langues")
     * @ORM\JoinColumn(name="element_a_support_id", referencedColumnName="element_a_support_id", nullable=false, onDelete="CASCADE")
     */
    protected $elementSupport;
    
    /**
     * @var \Acme\GeographieBundle\Entity\Langue
     *
     * @ORM\ManyToOne(targetEntity="Acme\GeographieBundle\Entity\Langue", inversedBy="elementSupportLangues")
     * @ORM\JoinColumn(name="langue_id", referencedColumnName="langue_id", nullable=false, onDelete="CASCADE")
     */
    protected $langue;
}

namespace Acme\CollectionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Lyssal\CollectionBundle\Entity\Illustration as IllustrationBase;

/**
 * Illustration.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_illustration")
 */
class Illustration extends IllustrationBase
{
    /**
     * @var \Acme\CollectionBundle\Entity\Illustration
     * 
     * @ORM\OneToOne(targetEntity="Illustration", inversedBy="originale", cascade={"persist"})
     * @ORM\JoinColumn(name="miniature_id", referencedColumnName="illustration_id", nullable=true, onDelete="CASCADE")
     */
    protected $miniature;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Illustration
     *
     * @ORM\OneToOne(targetEntity="Illustration", mappedBy="miniature")
     */
    protected $originale;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Element
     * 
     * @ORM\OneToOne(targetEntity="Element", mappedBy="illustrationRecto")
     */
    protected $rectoElement;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Element
     * 
     * @ORM\OneToOne(targetEntity="Element", mappedBy="illustrationVerso")
     */
    protected $versoElement;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Element
     *
     * @ORM\ManyToOne(targetEntity="Element", inversedBy="illustrations")
     * @ORM\JoinColumn(name="element_id", referencedColumnName="element_id", nullable=true)
     * @Gedmo\SortableGroup()
     */
    protected $element;
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\Personne as PersonneBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * Personne.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_personne")
 */
class Personne extends PersonneBase
{
    /**
     * @var \Acme\GeographieBundle\Entity\Pays
     *
     * @ORM\ManyToOne(targetEntity="\Acme\GeographieBundle\Entity\Pays", inversedBy="personnes")
     * @ORM\JoinColumn(name="nationalite_id", referencedColumnName="pays_id", nullable=true, onDelete="SET NULL")
     */
    protected $nationalite;
    
    /**
     * @var \Doctrine\Common\Collections\Collection
     * 
     * @ORM\OneToMany(targetEntity="ElementPersonne", mappedBy="personne")
     */
    protected $elementPersonnes;
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\PersonneRole as PersonneRoleBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * PersonneRole.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_personne_role")
 */
class PersonneRole extends PersonneRoleBase
{
    
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\Plateforme as PlateformeBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * Plateforme.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_plateforme")
 */
class Plateforme extends PlateformeBase
{
    
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\Societe as BaseSociete;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\UniqueConstraint;

/**
 * Société.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_societe")
 */
class Societe extends BaseSociete
{
    /**
     * @var \Acme\GeographieBundle\Entity\Pays
     *
     * @ORM\ManyToOne(targetEntity="\Acme\GeographieBundle\Entity\Pays", inversedBy="societes")
     * @ORM\JoinColumn(name="pays_id", referencedColumnName="pays_id", nullable=true, onDelete="CASCADE")
     */
    protected $pays;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Societe
     * 
     * @ORM\ManyToOne(targetEntity="Societe", inversedBy="enfants")
     * @ORM\JoinColumn(name="societe_parent_id", referencedColumnName="societe_id", nullable=true, onDelete="SET NULL")
     */
    protected $parent;
    
    /**
     * @var array<\Acme\CollectionBundle\Entity\Societe>
     * 
     * @ORM\OneToMany(targetEntity="Societe", mappedBy="parent")
     */
    protected $enfants;
    
    /**
     * @var array<\Acme\CollectionBundle\Entity\ElementSociete>
     * 
     * @ORM\OneToMany(targetEntity="ElementSociete", mappedBy="societe")
     */
    protected $elementSocietes;
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\SocieteRole as SocieteRoleBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * SocieteRole.
 * 
 * @author Rémi Leclerc <[email protected]>
 * @ORM\Entity()
 * @ORM\Table(name="acme_societe_role")
 */
class SocieteRole extends SocieteRoleBase
{
    
}

namespace Acme\CollectionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Lyssal\CollectionBundle\Entity\Support as SupportBase;

/**
 * Support.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_support")
 */
class Support extends SupportBase
{
    /**
     * @var array<\Acme\CollectionBundle\Entity\ElementSupport>
     *
     * @ORM\OneToMany(targetEntity="ElementSupport", mappedBy="support")
     */
    protected $elementSupports;
    
    /**
     * @var array<\Acme\CollectionBundle\Entity\UtilisateurSupport>
     *
     * @ORM\OneToMany(targetEntity="UtilisateurSupport", mappedBy="support")
     */
    protected $utilisateurSupports;
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\SupportLangageType as SupportLangageTypeBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * SupportLangageType.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_support_langage_type")
 */
class SupportLangageType extends SupportLangageTypeBase
{
    
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\Univers as UniversBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * Univers.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_univers")
 */
class Univers extends UniversBase
{
    
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\UtilisateurSupport as UtilisateurSupportBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * Support personnalisé d'un utilisateur.
 * 
 * @ORM\Entity()
 * @ORM\Table(name="acme_utilisateur_a_support")
 */
class UtilisateurSupport extends UtilisateurSupportBase
{
    /**
     * // Ceci est un exemple, utilisez l'utilisateur souhaité (LyssalUtilisateur, FOSUser, etc)
     * @var \Acme\UtilisateurBundle\Entity\Utilisateur
     *
     * @ORM\ManyToOne(targetEntity="\Acme\UtilisateurBundle\Entity\Utilisateur", inversedBy="utilisateurSupports")
     * @ORM\JoinColumn(name="utilisateur_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
     */
    protected $utilisateur;
    
    /**
     * @var \Acme\CollectionBundle\Entity\Support
     *
     * @ORM\ManyToOne(targetEntity="Support", inversedBy="utilisateurSupports")
     * @ORM\JoinColumn(name="support_id", referencedColumnName="support_id", nullable=false, onDelete="CASCADE")
     */
    protected $support;
    
    /**
     * @var array<\Acme\CollectionBundle\Entity\ElementSupport>
     * 
     * @ORM\OneToMany(targetEntity="ElementSupport", mappedBy="utilisateurSupport")
     */
    protected $elementSupports;
}

namespace Acme\CollectionBundle\Entity;

use Lyssal\CollectionBundle\Entity\Type as TypeBase;
use Doctrine\ORM\Mapping as ORM;

/**
 * Type.
 * 
 * @author Rémi Leclerc <[email protected]>
 * @ORM\Entity()
 * @ORM\Table(name="acme_type")
 */
class Type extends TypeBase
{
    
}

class Pays extends BasePays
{
    /**
     * @var array<\Acme\CollectionBundle\Entity\Element>
     *
     * @ORM\ManyToMany(targetEntity="\Acme\CollectionBundle\Entity\Element", mappedBy="origines")
     */
    private $elements;
    
    /**
     * @var array<\Acme\CollectionBundle\Entity\ElementDate>
     *
     * @ORM\OneToMany(targetEntity="\Acme\CollectionBundle\Entity\ElementDate", mappedBy="pays")
     */
    private $elementDates;
    
    /**
     * @var array<\Acme\CollectionBundle\Entity\ElementPrix>
     *
     * @ORM\OneToMany(targetEntity="\Acme\CollectionBundle\Entity\ElementPrix", mappedBy="pays")
     */
    private $elementPrix;
    
    /**
     * @var array<\Acme\CollectionBundle\Entity\Societe>
     *
     * @ORM\OneToMany(targetEntity="\Acme\CollectionBundle\Entity\Societe", mappedBy="pays")
     */
    private $societes;
    
    /**
     * @var array<\Acme\CollectionBundle\Entity\Personne>
     *
     * @ORM\OneToMany(targetEntity="\Acme\CollectionBundle\Entity\Personne", mappedBy="nationalite")
     */
    private $personnes;


    /**
     * Constructor
     */
    public function __construct()
    {
        parent::__construct();
        $this->elements = new \Doctrine\Common\Collections\ArrayCollection();
        $this->elementDates = new \Doctrine\Common\Collections\ArrayCollection();
        $this->elementPrix = new \Doctrine\Common\Collections\ArrayCollection();
        $this->societes = new \Doctrine\Common\Collections\ArrayCollection();
        $this->personnes = new \Doctrine\Common\Collections\ArrayCollection();
    }


    /**
     * Add elements
     *
     * @param \Acme\CollectionBundle\Entity\Element $elements
     * @return Pays
     */
    public function addElement(\Acme\CollectionBundle\Entity\Element $elements)
    {
        $this->elements[] = $elements;

        return $this;
    }

    /**
     * Remove elements
     *
     * @param \Acme\CollectionBundle\Entity\Element $elements
     */
    public function removeElement(\Acme\CollectionBundle\Entity\Element $elements)
    {
        $this->elements->removeElement($elements);
    }

    /**
     * Get elements
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getElements()
    {
        return $this->elements;
    }

    /**
     * Add elementDates
     *
     * @param \Acme\CollectionBundle\Entity\ElementDate $elementDates
     * @return Pays
     */
    public function addElementDate(\Acme\CollectionBundle\Entity\ElementDate $elementDates)
    {
        $this->elementDates[] = $elementDates;

        return $this;
    }

    /**
     * Remove elementDates
     *
     * @param \Acme\CollectionBundle\Entity\ElementDate $elementDates
     */
    public function removeElementDate(\Acme\CollectionBundle\Entity\ElementDate $elementDates)
    {
        $this->elementDates->removeElement($elementDates);
    }

    /**
     * Get elementDates
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getElementDates()
    {
        return $this->elementDates;
    }

    /**
     * Add elementPrix
     *
     * @param \Acme\CollectionBundle\Entity\ElementPrix $elementPrix
     * @return Pays
     */
    public function addElementPrix(\Acme\CollectionBundle\Entity\ElementPrix $elementPrix)
    {
        $this->elementPrix[] = $elementPrix;

        return $this;
    }

    /**
     * Remove elementPrix
     *
     * @param \Acme\CollectionBundle\Entity\ElementPrix $elementPrix
     */
    public function removeElementPrix(\Acme\CollectionBundle\Entity\ElementPrix $elementPrix)
    {
        $this->elementPrix->removeElement($elementPrix);
    }

    /**
     * Get elementPrix
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getElementPrix()
    {
        return $this->elementPrix;
    }

    /**
     * Add societes
     *
     * @param \Acme\CollectionBundle\Entity\Societe $societes
     * @return Pays
     */
    public function addSociete(\Acme\CollectionBundle\Entity\Societe $societes)
    {
        $this->societes[] = $societes;

        return $this;
    }

    /**
     * Remove societes
     *
     * @param \Acme\CollectionBundle\Entity\Societe $societes
     */
    public function removeSociete(\Acme\CollectionBundle\Entity\Societe $societes)
    {
        $this->societes->removeElement($societes);
    }

    /**
     * Get societes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getSocietes()
    {
        return $this->societes;
    }

    /**
     * Add personnes
     *
     * @param \Acme\CollectionBundle\Entity\Personne $personnes
     * @return Pays
     */
    public function addPersonne(\Acme\CollectionBundle\Entity\Personne $personnes)
    {
        $this->personnes[] = $personnes;

        return $this;
    }

    /**
     * Remove personnes
     *
     * @param \Acme\CollectionBundle\Entity\Personne $personnes
     */
    public function removePersonne(\Acme\CollectionBundle\Entity\Personne $personnes)
    {
        $this->personnes->removeElement($personnes);
    }

    /**
     * Get personnes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getPersonnes()
    {
        return $this->personnes;
    }
}

/**
 * Langue.
 * 
 * @ORM\Entity()
 * @ORM\Table
 * (
 *     name="acme_langue"
 * )
 */
class Langue extends \Lyssal\GeographieBundle\Entity\Langue
{
    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\OneToMany(targetEntity="Acme\UtilisateurBundle\Entity\Utilisateur", mappedBy="langue")
     */
    protected $utilisateurs;
    
    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\OneToMany(targetEntity="Acme\CollectionBundle\Entity\ElementSupportLangue", mappedBy="langue")
     */
    protected $elementSupportLangues;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\OneToMany(targetEntity="Acme\CollectionBundle\Entity\Traduction\Element", mappedBy="langue")
     */
    protected $traductionElements;
    
    
    /**
     * Constructeur.
     */
    public function __construct()
    {
        $this->utilisateurs = new \Doctrine\Common\Collections\ArrayCollection();
        $this->elementSupportLangues = new \Doctrine\Common\Collections\ArrayCollection();
        $this->traductionElements = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    
    /**
     * Add utilisateurs
     *
     * @param \Acme\UtilisateurBundle\Entity\Utilisateur $utilisateurs
     * @return Langue
     */
    public function addUtilisateur(\Acme\UtilisateurBundle\Entity\Utilisateur $utilisateurs)
    {
        $this->utilisateurs[] = $utilisateurs;

        return $this;
    }

    /**
     * Remove utilisateurs
     *
     * @param \Acme\UtilisateurBundle\Entity\Utilisateur $utilisateurs
     */
    public function removeUtilisateur(\Acme\UtilisateurBundle\Entity\Utilisateur $utilisateurs)
    {
        $this->utilisateurs->removeElement($utilisateurs);
    }

    /**
     * Get utilisateurs
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getUtilisateurs()
    {
        return $this->utilisateurs;
    }
    
    /**
     * Remove elementSupportLangues
     *
     * @param \Lyssal\CollectionBundle\Entity\ElementSupportLangue $elementSupportLangues
     */
    public function removeElementSupportLangue(\Lyssal\CollectionBundle\Entity\ElementSupportLangue $elementSupportLangues)
    {
        $this->elementSupportLangues->removeElement($elementSupportLangues);
    }
    
    /**
     * Get elementSupportLangues
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getElementSupportLangues()
    {
        return $this->elementSupportLangues;
    }

    /**
     * Add traductionElements
     *
     * @param \Acme\CollectionBundle\Entity\Traduction\Element $traductionElements
     * @return Langue
     */
    public function addTraductionElement(\Acme\CollectionBundle\Entity\Traduction\Element $traductionElements)
    {
        $this->traductionElements[] = $traductionElements;

        return $this;
    }

    /**
     * Remove traductionElements
     *
     * @param \Acme\CollectionBundle\Entity\Traduction\Element $traductionElements
     */
    public function removeTraductionElement(\Acme\CollectionBundle\Entity\Traduction\Element $traductionElements)
    {
        $this->traductionElements->removeElement($traductionElements);
    }

    /**
     * Get traductionElements
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getTraductionElements()
    {
        return $this->traductionElements;
    }
}

class Monnaie extends BaseMonnaie
{
    /**
     * @var array<\Acme\CollectionBundle\Entity\ElementPrix>
     *
     * @ORM\OneToMany(targetEntity="\Acme\CollectionBundle\Entity\ElementPrix", mappedBy="monnaie")
     */
    protected $elementPrix;
}

$tousLesTypes = $this->container->get('lyssal.collection.manager.type')->findAll();

new Lyssal\CollectionBundle\LyssalCollectionBundle(),
new Acme\CollectionBundle\AcmeCollectionBundle(),

doctrine:
    orm:
        default_repository_class: Lyssal\StructureBundle\Repository\EntityRepository
sh
php composer.phar update