<?php
namespace App\Entity;
use App\Repository\BlocsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=BlocsRepository::class)
*/
class Blocs
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $Type;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $Color1;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $Color2;
/**
* @ORM\ManyToOne(targetEntity=Lignes::class, inversedBy="blocs")
*/
private $Lignes;
/**
* @ORM\OneToMany(targetEntity=Contenus::class, mappedBy="Blocs")
*/
private $contenuses;
public function __construct()
{
$this->contenuses = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getType(): ?int
{
return $this->Type;
}
public function setType(?int $Type): self
{
$this->Type = $Type;
return $this;
}
public function getColor1(): ?string
{
return $this->Color1;
}
public function setColor1(?string $Color1): self
{
$this->Color1 = $Color1;
return $this;
}
public function getColor2(): ?string
{
return $this->Color2;
}
public function setColor2(?string $Color2): self
{
$this->Color2 = $Color2;
return $this;
}
public function getLignes(): ?Lignes
{
return $this->Lignes;
}
public function setLignes(?Lignes $Lignes): self
{
$this->Lignes = $Lignes;
return $this;
}
/**
* @return Collection<int, Contenus>
*/
public function getContenuses(): Collection
{
return $this->contenuses;
}
public function addContenus(Contenus $contenus): self
{
if (!$this->contenuses->contains($contenus)) {
$this->contenuses[] = $contenus;
$contenus->setBlocs($this);
}
return $this;
}
public function removeContenus(Contenus $contenus): self
{
if ($this->contenuses->removeElement($contenus)) {
// set the owning side to null (unless already changed)
if ($contenus->getBlocs() === $this) {
$contenus->setBlocs(null);
}
}
return $this;
}
}