<?php
namespace App\Entity;
use App\Repository\CustomerContentAboutUsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CustomerContentAboutUsRepository::class)]
class CustomerContentAboutUs
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(nullable: true)]
private ?bool $active = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\OneToMany(
mappedBy: 'customerContentAboutUs',
targetEntity: CustomerContentAboutUsImage::class,
cascade: ['persist', 'remove']
)]
private Collection $customerContentAboutUsImages;
public function __construct()
{
$this->customerContentAboutUsImages = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(?bool $active): self
{
$this->active = $active;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
/**
* @return Collection<int, CustomerContentAboutUsImage>
*/
public function getCustomerContentAboutUsImages(): Collection
{
return $this->customerContentAboutUsImages;
}
public function addCustomerContentAboutUsImage(CustomerContentAboutUsImage $customerContentAboutUsImage): self
{
if (!$this->customerContentAboutUsImages->contains($customerContentAboutUsImage)) {
$this->customerContentAboutUsImages->add($customerContentAboutUsImage);
$customerContentAboutUsImage->setCustomerContentAboutUs($this);
}
return $this;
}
public function removeCustomerContentAboutUsImage(CustomerContentAboutUsImage $customerContentAboutUsImage): self
{
if ($this->customerContentAboutUsImages->removeElement($customerContentAboutUsImage)) {
// set the owning side to null (unless already changed)
if ($customerContentAboutUsImage->getCustomerContentAboutUs() === $this) {
$customerContentAboutUsImage->setCustomerContentAboutUs(null);
}
}
return $this;
}
}