<?php
namespace App\Entity;
use App\Repository\PageAccueilServiceRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PageAccueilServiceRepository::class)]
class PageAccueilService implements \Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private int $id;
#[ORM\ManyToOne(targetEntity: RssArticle::class, inversedBy: 'pageAccueilServices')]
private mixed $url_rss_nordinfo;
#[ORM\ManyToMany(targetEntity: Service::class, inversedBy: 'pageAccueilServices')]
private mixed $services;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $presentation= null;
public function __construct()
{
$this->services = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getUrlRssNordinfo(): ?RssArticle
{
return $this->url_rss_nordinfo;
}
public function setUrlRssNordinfo(?RssArticle $url_rss_nordinfo): self
{
$this->url_rss_nordinfo = $url_rss_nordinfo;
return $this;
}
/**
* @return Collection|Service[]
*/
public function getServices(): Collection
{
return $this->services;
}
public function addService(Service $service): self
{
if (!$this->services->contains($service)) {
$this->services[] = $service;
}
return $this;
}
public function removeService(Service $service): self
{
$this->services->removeElement($service);
return $this;
}
public function setServices(Collection $services): self
{
$this->services = $services;
return $this;
}
public function getPresentation(): ?string
{
return $this->presentation;
}
public function setPresentation(?string $presentation): self
{
$this->presentation = $presentation;
return $this;
}
public function __toString(): string
{
return "Page accueil services";
}
}