src/Entity/Gestiform/Formations/Catalogue/Theme/SousTheme.php line 16
<?phpnamespace App\Entity\Gestiform\Formations\Catalogue\Theme;use App\Entity\AbstractEntity;use App\Entity\Common\Upload;use App\Repository\Gestiform\Formations\Catalogue\Theme\SousThemeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: SousThemeRepository::class)]class SousTheme extends AbstractEntity{#[ORM\Column(type: 'string', length: 255, nullable: false)]private string $intitule;#[ORM\JoinColumn(nullable: true)]#[ORM\OneToOne(targetEntity: Upload::class, cascade: ['persist', 'remove'])]private ?Upload $photo = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $alt = null;#[ORM\OneToMany(mappedBy: 'sousTheme', targetEntity: SousThemeTheme::class)]private Collection $sousThemeThemes;public function __construct(){$this->sousThemeThemes = new ArrayCollection();}public function getIntitule(): ?string{return $this->intitule;}public function setIntitule(string $intitule): self{$this->intitule = $intitule;return $this;}public function getAlt(): ?string{return $this->alt;}public function setAlt(?string $alt): self{$this->alt = $alt;return $this;}public function getPhoto(): ?Upload{return $this->photo;}public function setPhoto(?Upload $photo): self{$this->photo = $photo;return $this;}public function getSousThemeThemes(): Collection{return $this->sousThemeThemes;}public function addSousThemeTheme(SousThemeTheme $sousThemeTheme): self{if (!$this->sousThemeThemes->contains($sousThemeTheme)) {$this->sousThemeThemes->add($sousThemeTheme);$sousThemeTheme->setSousTheme($this);}return $this;}public function removeSousThemeTheme(SousThemeTheme $sousThemeTheme): self{// set the owning side to null (unless already changed)if ($this->sousThemeThemes->removeElement($sousThemeTheme) && $sousThemeTheme->getSousTheme() === $this) {$sousThemeTheme->setSousTheme(null);}return $this;}}