src/Entity/RecTypePopulation.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use APY\DataGridBundle\Grid\Mapping as GRID;
  9. /**
  10.  * Client
  11.  *
  12.  * @ORM\Table(name="rec_type_population")
  13.  * @ORM\HasLifecycleCallbacks
  14.  * @ORM\Entity(repositoryClass="App\Repository\RecTypePopulationRepository")
  15.  * @GRID\Source(columns="id, name, mail,catpopulation.identifiant, private")
  16.  */
  17. class RecTypePopulation
  18. {
  19.     /**
  20.      * @ORM\Id
  21.      * @ORM\Column(type="integer")
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      * @GRID\Column(title="Id", size="100", type="text",visible=false)
  24.      */
  25.     protected $id;
  26.     /**
  27.      * @Assert\NotBlank()
  28.      * @Assert\Length(
  29.      *     min = "2",
  30.      *  max = "20"
  31.      * )
  32.      * @ORM\Column(type="string", length=20)
  33.      * @GRID\Column(title="Id", size="500", type="text")
  34.      */
  35.      protected $identifiant;
  36.     /**
  37.      * @Assert\NotBlank()
  38.      * @Assert\Length(
  39.      *     min = "2",
  40.      *  max = "120"
  41.      * )
  42.      * @ORM\Column(type="string", length=120)
  43.      * @GRID\Column(title="Nom", size="300", type="text")
  44.      */
  45.     protected $name;
  46.     /**
  47.      * @Assert\NotBlank()
  48.      * @Assert\Length(
  49.      *     min = "2",
  50.      *  max = "200"
  51.      * )
  52.      * @ORM\Column(type="string", length=200)
  53.      * @GRID\Column(title="Mail", size="300", type="text")
  54.      */
  55.     protected $mail;
  56.     /**
  57.      * @var string
  58.      * @ORM\Column(name="signature_mail", type="text", nullable=true)
  59.      */
  60.     private $signatureMail;
  61.     /**
  62.      * @ORM\OneToMany(targetEntity="RecPoste", mappedBy="typepopulation")
  63.      */
  64.     protected $postes;
  65.     /**
  66.      *
  67.      * @ORM\ManyToOne(targetEntity="RecCategoryPopulation", inversedBy="typePopulation")
  68.      * @ORM\JoinColumn(name="catpopulation_id", referencedColumnName="id")
  69.      * @GRID\Column(field="catpopulation.identifiant", title="CatĂ©gorie",size="150", type="text")
  70.      */
  71.     protected $catpopulation;
  72.     /**
  73.      * @ORM\Column(name="private", type="boolean", nullable=true)
  74.      * @GRID\Column(title="PrivĂ©", type="boolean")
  75.      */
  76.     protected $private;
  77.     /**
  78.      * @ORM\Column(name="pdf", type="boolean", nullable=true)
  79.      */
  80.     private $pdf;
  81.     /**
  82.      * @var string
  83.      * @ORM\Column(name="uids", type="text", nullable=true)
  84.      */
  85.     private $uids;
  86.     /**
  87.      * @ORM\Column(name="archive", type="boolean", nullable=true)
  88.      */
  89.     private $archive;
  90.     public function __construct()
  91.     {
  92.         $this->postes = new ArrayCollection();
  93.         $this->private false;
  94.         $this->archive false;
  95.     }
  96.     /**
  97.      * Get id
  98.      *
  99.      * @return integer 
  100.      */
  101.     public function getId()
  102.     {
  103.         return $this->id;
  104.     }
  105.     /**
  106.      * Set name
  107.      *
  108.      * @param string $name
  109.      * @return RecTypePopulation
  110.      */
  111.     public function setName($name)
  112.     {
  113.         $this->name $name;
  114.         return $this;
  115.     }
  116.     /**
  117.      * Get name
  118.      *
  119.      * @return string 
  120.      */
  121.     public function getName()
  122.     {
  123.         return $this->name;
  124.     }
  125.     /**
  126.      * Add postes
  127.      *
  128.      * @param \App\Entity\RecPoste $postes
  129.      * @return RecTypePopulation
  130.      */
  131.     public function addPoste(\App\Entity\RecPoste $postes)
  132.     {
  133.         $this->postes[] = $postes;
  134.         return $this;
  135.     }
  136.     /**
  137.      * Remove postes
  138.      *
  139.      * @param \App\Entity\RecPoste $postes
  140.      */
  141.     public function removePoste(\App\Entity\RecPoste $postes)
  142.     {
  143.         $this->postes->removeElement($postes);
  144.     }
  145.     /**
  146.      * Get postes
  147.      *
  148.      * @return \Doctrine\Common\Collections\Collection 
  149.      */
  150.     public function getPostes()
  151.     {
  152.         return $this->postes;
  153.     }
  154.     /**
  155.      * Set mail
  156.      *
  157.      * @param string $mail
  158.      * @return RecTypePopulation
  159.      */
  160.     public function setMail($mail)
  161.     {
  162.         $this->mail $mail;
  163.         return $this;
  164.     }
  165.     /**
  166.      * Get mail
  167.      *
  168.      * @return string 
  169.      */
  170.     public function getMail()
  171.     {
  172.         return $this->mail;
  173.     }
  174.     /**
  175.      * Set label
  176.      *
  177.      * @param string $label
  178.      * @return RecTypePopulation
  179.      */
  180.     public function setLabel($label)
  181.     {
  182.         $this->label $label;
  183.         return $this;
  184.     }
  185.     /**
  186.      * Get label
  187.      *
  188.      * @return string 
  189.      */
  190.     public function getLabel()
  191.     {
  192.         return $this->label;
  193.     }
  194.     /**
  195.      * Set identifant
  196.      *
  197.      * @param string $identifant
  198.      * @return RecTypePopulation
  199.      */
  200.     public function setIdentifant($identifant)
  201.     {
  202.         $this->identifant $identifant;
  203.         return $this;
  204.     }
  205.     /**
  206.      * Get identifant
  207.      *
  208.      * @return string 
  209.      */
  210.     public function getIdentifant()
  211.     {
  212.         return $this->identifant;
  213.     }
  214.     /**
  215.      * Set identifiant
  216.      *
  217.      * @param string $identifiant
  218.      * @return RecTypePopulation
  219.      */
  220.     public function setIdentifiant($identifiant)
  221.     {
  222.         $this->identifiant $identifiant;
  223.         return $this;
  224.     }
  225.     /**
  226.      * Get identifiant
  227.      *
  228.      * @return string 
  229.      */
  230.     public function getIdentifiant()
  231.     {
  232.         return $this->identifiant;
  233.     }
  234.     /**
  235.      * Set catpopulation
  236.      *
  237.      * @param \App\Entity\RecCategoryPopulation $catpopulation
  238.      * @return RecTypePopulation
  239.      */
  240.     public function setCatpopulation(\App\Entity\RecCategoryPopulation $catpopulation null)
  241.     {
  242.         $this->catpopulation $catpopulation;
  243.         return $this;
  244.     }
  245.     /**
  246.      * Get catpopulation
  247.      *
  248.      * @return \Dosi\RecrutementBundle\Entity\RecCategoryPopulation 
  249.      */
  250.     public function getCatpopulation()
  251.     {
  252.         return $this->catpopulation;
  253.     }
  254.     /**
  255.      * Set private.
  256.      *
  257.      * @param bool|null $private
  258.      *
  259.      * @return RecTypePopulation
  260.      */
  261.     public function setPrivate($private null)
  262.     {
  263.         $this->private $private;
  264.         return $this;
  265.     }
  266.     /**
  267.      * Get private.
  268.      *
  269.      * @return bool|null
  270.      */
  271.     public function getPrivate()
  272.     {
  273.         return $this->private;
  274.     }
  275.     public function isPrivate(): ?bool
  276.     {
  277.         return $this->private;
  278.     }
  279.     public function getUids($explode=false)
  280.     {
  281.         if($explode)
  282.             return explode(";",$this->uids);
  283.         else
  284.             return $this->uids;
  285.     }
  286.     public function setUids(?string $uids): static
  287.     {
  288.         $this->uids $uids;
  289.         return $this;
  290.     }
  291.     public function isPdf(): ?bool
  292.     {
  293.         return $this->pdf;
  294.     }
  295.     public function setPdf(?bool $pdf): static
  296.     {
  297.         $this->pdf $pdf;
  298.         return $this;
  299.     }
  300.     public function isArchive(): ?bool
  301.     {
  302.         return $this->archive;
  303.     }
  304.     public function setArchive(?bool $archive): static
  305.     {
  306.         $this->archive $archive;
  307.         return $this;
  308.     }
  309.     public function getSignatureMail(): ?string
  310.     {
  311.         return $this->signatureMail;
  312.     }
  313.     public function setSignatureMail(?string $signatureMail): static
  314.     {
  315.         $this->signatureMail $signatureMail;
  316.         return $this;
  317.     }
  318. }