<?php
namespace App\Entity;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\Common\Collections\ArrayCollection;
use APY\DataGridBundle\Grid\Mapping as GRID;
/**
* Client
*
* @ORM\Table(name="rec_type_population")
* @ORM\HasLifecycleCallbacks
* @ORM\Entity(repositoryClass="App\Repository\RecTypePopulationRepository")
* @GRID\Source(columns="id, name, mail,catpopulation.identifiant, private")
*/
class RecTypePopulation
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
* @GRID\Column(title="Id", size="100", type="text",visible=false)
*/
protected $id;
/**
* @Assert\NotBlank()
* @Assert\Length(
* min = "2",
* max = "20"
* )
* @ORM\Column(type="string", length=20)
* @GRID\Column(title="Id", size="500", type="text")
*/
protected $identifiant;
/**
* @Assert\NotBlank()
* @Assert\Length(
* min = "2",
* max = "120"
* )
* @ORM\Column(type="string", length=120)
* @GRID\Column(title="Nom", size="300", type="text")
*/
protected $name;
/**
* @Assert\NotBlank()
* @Assert\Length(
* min = "2",
* max = "200"
* )
* @ORM\Column(type="string", length=200)
* @GRID\Column(title="Mail", size="300", type="text")
*/
protected $mail;
/**
* @var string
* @ORM\Column(name="signature_mail", type="text", nullable=true)
*/
private $signatureMail;
/**
* @ORM\OneToMany(targetEntity="RecPoste", mappedBy="typepopulation")
*/
protected $postes;
/**
*
* @ORM\ManyToOne(targetEntity="RecCategoryPopulation", inversedBy="typePopulation")
* @ORM\JoinColumn(name="catpopulation_id", referencedColumnName="id")
* @GRID\Column(field="catpopulation.identifiant", title="Catégorie",size="150", type="text")
*/
protected $catpopulation;
/**
* @ORM\Column(name="private", type="boolean", nullable=true)
* @GRID\Column(title="Privé", type="boolean")
*/
protected $private;
/**
* @ORM\Column(name="pdf", type="boolean", nullable=true)
*/
private $pdf;
/**
* @var string
* @ORM\Column(name="uids", type="text", nullable=true)
*/
private $uids;
/**
* @ORM\Column(name="archive", type="boolean", nullable=true)
*/
private $archive;
public function __construct()
{
$this->postes = new ArrayCollection();
$this->private = false;
$this->archive = false;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
* @return RecTypePopulation
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Add postes
*
* @param \App\Entity\RecPoste $postes
* @return RecTypePopulation
*/
public function addPoste(\App\Entity\RecPoste $postes)
{
$this->postes[] = $postes;
return $this;
}
/**
* Remove postes
*
* @param \App\Entity\RecPoste $postes
*/
public function removePoste(\App\Entity\RecPoste $postes)
{
$this->postes->removeElement($postes);
}
/**
* Get postes
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getPostes()
{
return $this->postes;
}
/**
* Set mail
*
* @param string $mail
* @return RecTypePopulation
*/
public function setMail($mail)
{
$this->mail = $mail;
return $this;
}
/**
* Get mail
*
* @return string
*/
public function getMail()
{
return $this->mail;
}
/**
* Set label
*
* @param string $label
* @return RecTypePopulation
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set identifant
*
* @param string $identifant
* @return RecTypePopulation
*/
public function setIdentifant($identifant)
{
$this->identifant = $identifant;
return $this;
}
/**
* Get identifant
*
* @return string
*/
public function getIdentifant()
{
return $this->identifant;
}
/**
* Set identifiant
*
* @param string $identifiant
* @return RecTypePopulation
*/
public function setIdentifiant($identifiant)
{
$this->identifiant = $identifiant;
return $this;
}
/**
* Get identifiant
*
* @return string
*/
public function getIdentifiant()
{
return $this->identifiant;
}
/**
* Set catpopulation
*
* @param \App\Entity\RecCategoryPopulation $catpopulation
* @return RecTypePopulation
*/
public function setCatpopulation(\App\Entity\RecCategoryPopulation $catpopulation = null)
{
$this->catpopulation = $catpopulation;
return $this;
}
/**
* Get catpopulation
*
* @return \Dosi\RecrutementBundle\Entity\RecCategoryPopulation
*/
public function getCatpopulation()
{
return $this->catpopulation;
}
/**
* Set private.
*
* @param bool|null $private
*
* @return RecTypePopulation
*/
public function setPrivate($private = null)
{
$this->private = $private;
return $this;
}
/**
* Get private.
*
* @return bool|null
*/
public function getPrivate()
{
return $this->private;
}
public function isPrivate(): ?bool
{
return $this->private;
}
public function getUids($explode=false)
{
if($explode)
return explode(";",$this->uids);
else
return $this->uids;
}
public function setUids(?string $uids): static
{
$this->uids = $uids;
return $this;
}
public function isPdf(): ?bool
{
return $this->pdf;
}
public function setPdf(?bool $pdf): static
{
$this->pdf = $pdf;
return $this;
}
public function isArchive(): ?bool
{
return $this->archive;
}
public function setArchive(?bool $archive): static
{
$this->archive = $archive;
return $this;
}
public function getSignatureMail(): ?string
{
return $this->signatureMail;
}
public function setSignatureMail(?string $signatureMail): static
{
$this->signatureMail = $signatureMail;
return $this;
}
}