<?php
namespace App\Entity;
use App\Repository\TrainingsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: TrainingsRepository::class)]
class Trainings
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private int $id;
#[ORM\Column(type: 'text')]
private string $title;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $subTitle;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $code;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $cutInBlocks;
#[ORM\ManyToMany(targetEntity: Domain::class, inversedBy: 'trainings')]
private Collection $domain;
#[ORM\ManyToMany(targetEntity: SubDomain::class, inversedBy: 'trainings')]
private Collection $subDomain;
#[ORM\ManyToMany(targetEntity: Keywords::class, inversedBy: 'trainings')]
private ?Collection $keywords;
#[ORM\ManyToOne(targetEntity: Type::class, inversedBy: 'trainings')]
private ?Type $type;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $new;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $customizable;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $objectives;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $complementaryObjectives;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $pedagogicContent;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $pluses;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $concernedPersons;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $prerequisites;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $price;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $time;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $date;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $place;
#[ORM\ManyToMany(targetEntity: DeviceAndTraining::class, inversedBy: 'trainings')]
private ?Collection $deviceAndTraining;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $termsOfAccess;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $alternatingRythm;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $teachingMethods;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $teachingMeans;
#[ORM\ManyToOne(targetEntity: CertificationType::class, inversedBy: 'trainings')]
private ?CertificationType $certificationType;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $educationLevel;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $trainingOrder;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $certificationName;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $assessmentMethods;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $targetFunctions;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $continuingStudies;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $disabledAccessibility;
#[ORM\ManyToMany(targetEntity: User::class, inversedBy: 'trainingsPedagogicals')]
private ?Collection $pedagogicalReferent;
#[ORM\ManyToMany(targetEntity: User::class, inversedBy: 'trainingsPedagogicals')]
#[ORM\JoinTable(name: 'commercials_trainings')]
private ?Collection $commercials;
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'trainings')]
private ?User $owner;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $testimonials;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $accessibilityText;
#[ORM\Column(type: 'date', nullable: true)]
private ?\DateTime $creationDate;
#[ORM\Column(type: 'date', nullable: true)]
private ?\DateTime $editDate;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $logoDisplay;
#[ORM\Column(type: 'integer', nullable: true)]
private ?bool $whichPublic;
#[ORM\OneToMany(mappedBy: 'trainings', targetEntity: Sessions::class, cascade: ['persist'])]
private ?Collection $sessions;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $published;
#[ORM\Column(type: 'boolean', nullable: false, options: ["default" => 0])]
private ?bool $isFiche;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $slug;
#[ORM\ManyToOne(targetEntity: TrainingPlace::class, inversedBy: 'trainings')]
private ?TrainingPlace $trainingPlace;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $ficheTitle;
#[ORM\ManyToMany(targetEntity: self::class)]
private ?Collection $linkedTrainings;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $traineeOrEnterprise;
#[ORM\Column(type: 'date', nullable: true)]
private ?\DateTimeInterface $validityDate;
#[ORM\OneToMany(mappedBy: 'training', targetEntity: SubDomainOrder::class, orphanRemoval: true)]
private Collection $subDomainOrders;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $linkVideo;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $rncpOrRs;
#[ORM\Column(type: 'integer', nullable: true)]
private $days;
#[ORM\Column(type: 'integer', nullable: true)]
private $hours;
#[ORM\Column(type: 'text', nullable: true)]
private $companyMissions;
#[ORM\ManyToOne(targetEntity: EducationLevel::class, inversedBy: 'trainings')]
private $educationLevelName;
#[ORM\ManyToOne(targetEntity: PublicType::class, inversedBy: 'trainings')]
private $publicType;
#[ORM\Column(type: 'datetime', nullable: true)]
private $validityDateRncp;
#[ORM\Column(type: 'boolean', nullable: true)]
private $resetDate;
public function __construct()
{
$this->domain = new ArrayCollection();
$this->subDomain = new ArrayCollection();
$this->keywords = new ArrayCollection();
$this->deviceAndTraining = new ArrayCollection();
$this->pedagogicalReferent = new ArrayCollection();
$this->commercials = new ArrayCollection();
$this->sessions = new ArrayCollection();
$this->linkedTrainings = new ArrayCollection();
$this->subDomainOrders = new ArrayCollection();
$this->validityDateRncp = null;
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getSubTitle(): ?string
{
return $this->subTitle;
}
public function setSubTitle(?string $subTitle): self
{
$this->subTitle = $subTitle;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
public function isCutInBlocks(): ?bool
{
return $this->cutInBlocks;
}
public function setCutInBlocks(?bool $cutInBlocks): self
{
$this->cutInBlocks = $cutInBlocks;
return $this;
}
/**
* @return Collection<int, Domain>
*/
public function getDomain(): Collection
{
return $this->domain;
}
public function addDomain(Domain $domain): self
{
if (!$this->domain->contains($domain)) {
$this->domain[] = $domain;
$domain->addTraining($this);
}
return $this;
}
public function removeDomain(Domain $domain): self
{
if ($this->domain->removeElement($domain)) {
$domain->removeTraining($this);
}
return $this;
}
/**
* @return Collection<int, SubDomain>
*/
public function getSubDomain(): Collection
{
return $this->subDomain;
}
public function addSubDomain(SubDomain $subDomain): self
{
if (!$this->subDomain->contains($subDomain)) {
$this->subDomain[] = $subDomain;
$subDomain->addTraining($this);
}
return $this;
}
public function removeSubDomain(SubDomain $subDomain): self
{
if ($this->subDomain->removeElement($subDomain)) {
$subDomain->removeTraining($this);
}
return $this;
}
/**
* @return Collection<int, Keywords>
*/
public function getKeywords(): Collection
{
return $this->keywords;
}
public function addKeyword(Keywords $keyword): self
{
if (!$this->keywords->contains($keyword)) {
$this->keywords[] = $keyword;
$keyword->addTraining($this);
}
return $this;
}
public function removeKeyword(Keywords $keyword): self
{
$this->keywords->removeElement($keyword);
return $this;
}
public function getType(): ?Type
{
return $this->type;
}
public function setType(?Type $type): self
{
$this->type = $type;
return $this;
}
public function isNew(): ?bool
{
return $this->new;
}
public function setNew(?bool $new): self
{
$this->new = $new;
return $this;
}
public function getCustomizable(): ?string
{
return $this->customizable;
}
public function setCustomizable(?string $customizable): self
{
$this->customizable = $customizable;
return $this;
}
public function getObjectives(): ?string
{
return $this->objectives;
}
public function getObjectivesNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->objectives));
}
public function setObjectives(?string $objectives): self
{
$this->objectives = $objectives;
return $this;
}
public function getComplementaryObjectives(): ?string
{
return $this->complementaryObjectives;
}
public function getComplementaryObjectivesNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->complementaryObjectives));
}
public function setComplementaryObjectives(?string $complementaryObjectives): self
{
$this->complementaryObjectives = $complementaryObjectives;
return $this;
}
public function getPedagogicContent(): ?string
{
return $this->pedagogicContent;
}
public function getPedagogicContentNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->getPedagogicContent()));
}
public function setPedagogicContent(?string $pedagogicContent): self
{
$this->pedagogicContent = $pedagogicContent;
return $this;
}
public function getPluses(): ?string
{
return $this->pluses;
}
public function getPlusesNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->pluses));
}
public function setPluses(?string $pluses): self
{
$this->pluses = $pluses;
return $this;
}
public function getConcernedPersons(): ?string
{
return $this->concernedPersons;
}
public function getConcernedPersonsNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->concernedPersons));
}
public function setConcernedPersons(?string $concernedPersons): self
{
$this->concernedPersons = $concernedPersons;
return $this;
}
public function getPrerequisites(): ?string
{
return $this->prerequisites;
}
public function getPrerequisitesNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->prerequisites));
}
public function setPrerequisites(?string $prerequisites): self
{
$this->prerequisites = $prerequisites;
return $this;
}
public function getPrice(): ?string
{
return $this->price;
}
public function setPrice(?string $price): self
{
$this->price = $price;
return $this;
}
public function getTime(): ?string
{
return $this->time;
}
public function setTime(?string $time): self
{
$this->time = $time;
return $this;
}
public function getDate(): ?string
{
return $this->date;
}
public function setDate(?string $date): self
{
$this->date = $date;
return $this;
}
public function getPlace(): ?string
{
return $this->place;
}
public function setPlace(?string $place): self
{
$this->place = $place;
return $this;
}
/**
* @return Collection<int, DeviceAndTraining>
*/
public function getDeviceAndTraining(): Collection
{
return $this->deviceAndTraining;
}
public function addDeviceAndTraining(DeviceAndTraining $deviceAndTraining): self
{
if (!$this->deviceAndTraining->contains($deviceAndTraining)) {
$this->deviceAndTraining[] = $deviceAndTraining;
$deviceAndTraining->addTraining($this);
}
return $this;
}
public function removeDeviceAndTraining(DeviceAndTraining $deviceAndTraining): self
{
if ($this->deviceAndTraining->removeElement($deviceAndTraining)) {
$deviceAndTraining->removeTraining($this);
}
return $this;
}
public function getTermsOfAccess(): ?string
{
return $this->termsOfAccess;
}
public function getTermsOfAccessNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->termsOfAccess));
}
public function setTermsOfAccess(?string $termsOfAccess): self
{
$this->termsOfAccess = $termsOfAccess;
return $this;
}
public function getAlternatingRythm(): ?string
{
return $this->alternatingRythm;
}
public function getAlternatingRythmNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->alternatingRythm));
}
public function setAlternatingRythm(?string $alternatingRythm): self
{
$this->alternatingRythm = $alternatingRythm;
return $this;
}
public function getTeachingMethods(): ?string
{
return $this->teachingMethods;
}
public function getTeachingMethodsNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->teachingMethods));
}
public function setTeachingMethods(?string $teachingMethods): self
{
$this->teachingMethods = $teachingMethods;
return $this;
}
public function getTeachingMeans(): ?string
{
return $this->teachingMeans;
}
public function getTeachingsMeansNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->teachingMeans));
}
public function setTeachingMeans(?string $teachingMeans): self
{
$this->teachingMeans = $teachingMeans;
return $this;
}
public function getCertificationType(): ?CertificationType
{
return $this->certificationType;
}
public function setCertificationType(?CertificationType $certificationType): self
{
$this->certificationType = $certificationType;
return $this;
}
public function getEducationLevel(): ?string
{
return $this->educationLevel;
}
public function setEducationLevel(?string $educationLevel): self
{
$this->educationLevel = $educationLevel;
return $this;
}
public function getTrainingOrder(): ?int
{
return $this->trainingOrder;
}
public function setTrainingOrder(?int $trainingOrder): self
{
$this->trainingOrder = $trainingOrder;
return $this;
}
public function getCertificationName(): ?string
{
return $this->certificationName;
}
public function setCertificationName(?string $certificationName): self
{
$this->certificationName = $certificationName;
return $this;
}
public function getAssessmentMethods(): ?string
{
return $this->assessmentMethods;
}
public function getAssessmentMethodsNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->assessmentMethods));
}
public function setAssessmentMethods(?string $assessmentMethods): self
{
$this->assessmentMethods = $assessmentMethods;
return $this;
}
public function getTargetFunctions(): ?string
{
return $this->targetFunctions;
}
public function getTargetFunctionsNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->targetFunctions));
}
public function setTargetFunctions(?string $targetFunctions): self
{
$this->targetFunctions = $targetFunctions;
return $this;
}
public function getContinuingStudies(): ?string
{
return $this->continuingStudies;
}
public function getContinuingStudiesNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->continuingStudies));
}
public function setContinuingStudies(?string $continuingStudies): self
{
$this->continuingStudies = $continuingStudies;
return $this;
}
public function getDisabledAccessibility(): ?int
{
return $this->disabledAccessibility;
}
public function setDisabledAccessibility(?int $disabledAccessibility): self
{
$this->disabledAccessibility = $disabledAccessibility;
return $this;
}
public function getPedagogicalReferent(): ?Collection
{
return $this->pedagogicalReferent;
}
public function addPedagogicalReferent(?User $pedagogicalReferent): self
{
if (!$this->pedagogicalReferent->contains($pedagogicalReferent)) {
$this->pedagogicalReferent[] = $pedagogicalReferent;
$pedagogicalReferent->addTrainingsPedagogical($this);
}
return $this;
}
public function removePedagogicalReferent(?User $pedagogicalReferent): self
{
$this->pedagogicalReferent->removeElement($pedagogicalReferent);
return $this;
}
public function getCommercials(): ?Collection
{
return $this->commercials;
}
public function addCommercial(?User $commercial): self
{
if (!$this->commercials->contains($commercial)) {
$this->commercials[] = $commercial;
$commercial->addTrainingsPedagogical($this);
}
return $this;
}
public function removeCommercial(?User $commercial): self
{
$this->commercials->removeElement($commercial);
return $this;
}
public function getOwner(): ?User
{
return $this->owner;
}
public function setOwner(?User $owner): self
{
$this->owner = $owner;
return $this;
}
public function isIsFiche(): ?bool
{
return $this->isFiche;
}
public function setIsFiche(?bool $isFiche): self
{
$this->isFiche = $isFiche;
return $this;
}
public function getTestimonials(): ?string
{
return $this->testimonials;
}
public function getTestimonialsNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->testimonials));
}
public function setTestimonials(?string $testimonials): self
{
$this->testimonials = $testimonials;
return $this;
}
public function getAccessibilityText(): ?string
{
return $this->accessibilityText;
}
public function getAccessibilityTextNoHtml(): ?string
{
return strip_tags(html_entity_decode($this->accessibilityText));
}
public function setAccessibilityText(?string $accessibilityText): self
{
$this->accessibilityText = $accessibilityText;
return $this;
}
public function getCreationDate(): ?\DateTime
{
return $this->creationDate;
}
public function setCreationDate(?\DateTime $creationDate): self
{
$this->creationDate = $creationDate;
return $this;
}
public function getEditDate(): ?\DateTime
{
return $this->editDate;
}
public function setEditDate(?\DateTime $editDate): self
{
$this->editDate = $editDate;
return $this;
}
public function isLogoDisplay(): ?bool
{
return $this->logoDisplay;
}
public function setLogoDisplay(?bool $logoDisplay): self
{
$this->logoDisplay = $logoDisplay;
return $this;
}
public function getWhichPublic(): ?int
{
return $this->whichPublic;
}
public function setWhichPublic(?int $whichPublic): self
{
$this->whichPublic = $whichPublic;
return $this;
}
/**
* @return Collection<int, Sessions>
*/
public function getSessions(): Collection
{
return $this->sessions;
}
public function addSession(Sessions $session): self
{
if (!$this->sessions->contains($session)) {
$this->sessions[] = $session;
$session->setTrainings($this);
}
return $this;
}
public function removeSession(Sessions $session): self
{
if ($this->sessions->removeElement($session)) {
// set the owning side to null (unless already changed)
if ($session->getTrainings() === $this) {
$session->setTrainings(null);
}
}
return $this;
}
public function isPublished(): ?bool
{
return $this->published;
}
public function setPublished(?bool $published): self
{
$this->published = $published;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(?string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getTrainingPlace(): ?TrainingPlace
{
return $this->trainingPlace;
}
public function setTrainingPlace(?TrainingPlace $trainingPlace): self
{
$this->trainingPlace = $trainingPlace;
return $this;
}
public function getFicheTitle(): ?string
{
return $this->ficheTitle;
}
public function setFicheTitle(?string $ficheTitle): self
{
$this->ficheTitle = $ficheTitle;
return $this;
}
public function getLinkedTrainings(): ?Collection
{
return $this->linkedTrainings;
}
public function addLinkedTraining(self $linkedTraining): self
{
if (!$this->linkedTrainings->contains($linkedTraining)) {
$this->linkedTrainings[] = $linkedTraining;
// $linkedTraining->addLinkedTraining($this);
}
return $this;
}
public function removeLinkedTraining(self $linkedTraining): self
{
$this->linkedTrainings->removeElement($linkedTraining);
return $this;
}
public function getTraineeOrEnterprise(): ?string
{
return $this->traineeOrEnterprise;
}
public function setTraineeOrEnterprise(?string $traineeOrEnterprise): self
{
$this->traineeOrEnterprise = $traineeOrEnterprise;
return $this;
}
public function getValidityDate(): ?\DateTimeInterface
{
return $this->validityDate;
}
public function setValidityDate(?\DateTimeInterface $validityDate): self
{
$this->validityDate = $validityDate;
return $this;
}
/**
* @return Collection<int, SubDomainOrder>
*/
public function getSubDomainOrders(): Collection
{
return $this->subDomainOrders;
}
public function addSubDomainOrder(SubDomainOrder $subDomainOrder): self
{
if (!$this->subDomainOrders->contains($subDomainOrder)) {
$this->subDomainOrders[] = $subDomainOrder;
$subDomainOrder->setTraining($this);
}
return $this;
}
public function removeSubDomainOrder(SubDomainOrder $subDomainOrder): self
{
if ($this->subDomainOrders->removeElement($subDomainOrder)) {
// set the owning side to null (unless already changed)
if ($subDomainOrder->getTraining() === $this) {
$subDomainOrder->setTraining(null);
}
}
return $this;
}
public function getLinkVideo(): ?string
{
return $this->linkVideo;
}
public function setLinkVideo(?string $linkVideo): self
{
$this->linkVideo = $linkVideo;
return $this;
}
public function getRncpOrRs(): ?string
{
return $this->rncpOrRs;
}
public function setRncpOrRs(?string $rncpOrRs): self
{
$this->rncpOrRs = $rncpOrRs;
return $this;
}
public function getDays(): ?int
{
return $this->days;
}
public function setDays(?int $days): self
{
$this->days = $days;
return $this;
}
public function getHours(): ?int
{
return $this->hours;
}
public function setHours(?int $hours): self
{
$this->hours = $hours;
return $this;
}
public function getCompanyMissions(): ?string
{
return $this->companyMissions;
}
public function setCompanyMissions(?string $companyMissions): self
{
$this->companyMissions = $companyMissions;
return $this;
}
public function getEducationLevelName(): ?EducationLevel
{
return $this->educationLevelName;
}
public function setEducationLevelName(?EducationLevel $educationLevelName): self
{
$this->educationLevelName = $educationLevelName;
return $this;
}
public function getPublicType(): ?PublicType
{
return $this->publicType;
}
public function setPublicType(?PublicType $publicType): self
{
$this->publicType = $publicType;
return $this;
}
public function getValidityDateRncp(): ?\DateTimeInterface
{
return $this->validityDateRncp;
}
public function setValidityDateRncp(?\DateTimeInterface $validityDateRncp): self
{
$this->validityDateRncp = $validityDateRncp;
return $this;
}
public function isResetDate(): ?bool
{
return $this->resetDate;
}
public function setResetDate(?bool $resetDate): self
{
$this->resetDate = $resetDate;
return $this;
}
}