<?php
namespace App\Entity;
use App\Repository\LMSSequenceRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=LMSSequenceRepository::class)
*/
class LMSSequence
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $title;
/**
* @ORM\Column(type="text", nullable="true")
*/
private $description;
/**
* @ORM\Column(type="integer")
*/
private $duration;
/**
* @ORM\Column(type="boolean")
*/
private $isOnline;
/**
* @ORM\Column(type="boolean")
*/
private $isActive;
/**
* @ORM\ManyToOne(targetEntity=LMSModule::class, inversedBy="lMSSequences")
*/
private $lmsModule;
/**
* @ORM\OneToMany(targetEntity=LMSContent::class, mappedBy="lMSSequence")
*/
private $lmsContents;
/**
* @ORM\OneToMany(targetEntity=LMSExercise::class, mappedBy="lMSSequence")
*/
private $lmsExercises;
/**
* @ORM\ManyToMany(targetEntity=User::class, mappedBy="LMSSequences")
*/
private $users;
private $progressionSequence;
public function __construct()
{
$this->lmsContents = new ArrayCollection();
$this->lmsExercises = new ArrayCollection();
$this->users = new ArrayCollection();
}
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 getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getDuration(): ?int
{
return $this->duration;
}
public function setDuration(int $duration): self
{
$this->duration = $duration;
return $this;
}
public function isIsOnline(): ?bool
{
return $this->isOnline;
}
public function setIsOnline(bool $isOnline): self
{
$this->isOnline = $isOnline;
return $this;
}
public function isIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
public function getLmsModule(): ?LMSModule
{
return $this->lmsModule;
}
public function setLmsModule(?LMSModule $lmsModule): self
{
$this->lmsModule = $lmsModule;
return $this;
}
/**
* @return Collection<int, LMSContent>
*/
public function getLmsContents(): Collection
{
return $this->lmsContents;
}
public function addLmsContent(LMSContent $lmsContent): self
{
if (!$this->lmsContents->contains($lmsContent)) {
$this->lmsContents[] = $lmsContent;
$lmsContent->setLMSSequence($this);
}
return $this;
}
public function removeLmsContent(LMSContent $lmsContent): self
{
if ($this->lmsContents->removeElement($lmsContent)) {
// set the owning side to null (unless already changed)
if ($lmsContent->getLMSSequence() === $this) {
$lmsContent->setLMSSequence(null);
}
}
return $this;
}
/**
* @return Collection<int, LMSExercise>
*/
public function getLmsExercises(): Collection
{
return $this->lmsExercises;
}
public function addLmsExercise(LMSExercise $lmsExercise): self
{
if (!$this->lmsExercises->contains($lmsExercise)) {
$this->lmsExercises[] = $lmsExercise;
$lmsExercise->setLMSSequence($this);
}
return $this;
}
public function removeLmsExercise(LMSExercise $lmsExercise): self
{
if ($this->lmsExercises->removeElement($lmsExercise)) {
// set the owning side to null (unless already changed)
if ($lmsExercise->getLMSSequence() === $this) {
$lmsExercise->setLMSSequence(null);
}
}
return $this;
}
/**
* @return Collection<int, User>
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(User $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->addLMSSequence($this);
}
return $this;
}
public function removeUser(User $user): self
{
if ($this->users->removeElement($user)) {
$user->removeLMSSequence($this);
}
return $this;
}
/**
* Get the value of contentProgression
*/
public function getProgressionSequence()
{
return $this->progressionSequence;
}
/**
* Set the value of contentProgression
*
* @return self
*/
public function setProgressionSequence($progressionSequence)
{
$this->progressionSequence = $progressionSequence;
return $this;
}
}