File: /var/www/dvpis2025/dvpis.kaunokolegija.lt/src/Entity/LecturerPosition.php
<?php
namespace App\Entity;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* LecturerPosition
*/
#[ORM\Table(name: 'lecturer_position')]
#[ORM\Entity(repositoryClass: \App\Repository\LecturerPositionRepository::class)]
class LecturerPosition
{
#[ORM\Column]
#[ORM\Id]
#[ORM\GeneratedValue]
private ?int $id = null;
/**
* @var string
*/
#[ORM\Column(name: 'short_name', type: 'string', length: 255, unique: true)]
private $shortName;
/**
* @var string
*/
#[ORM\Column(name: 'name', type: 'string', length: 255)]
private $name;
/**
* @var integer|null
*/
#[ORM\Column(type: Types::SMALLINT, nullable: true)]
private ?int $isForPlan = null;
#[ORM\OneToMany(mappedBy: 'lecturerPosition', targetEntity: Lecturer::class)]
private Collection $lecturers;
#[ORM\OneToMany(mappedBy: 'lecturerPosition', targetEntity: LecturerPlan::class)]
private Collection $lecturerPlans;
#[ORM\OneToMany(mappedBy: 'lecturerPosition', targetEntity: LecturerPlanHistory::class)]
private Collection $lecturerPlanHistorys;
#[ORM\OneToMany(mappedBy: 'lecturerPosition', targetEntity: FinalProject::class)]
private Collection $finalProjects;
#[ORM\OneToMany(mappedBy: 'lecturerPosition', targetEntity: FinalEgzam::class)]
private Collection $finalEgzams;
#[ORM\OneToMany(mappedBy: 'lecturerPosition', targetEntity: FinalProjectHistory::class)]
private Collection $finalProjectsHistory;
#[ORM\OneToMany(mappedBy: 'lecturerPosition', targetEntity: FinalEgzamHistory::class)]
private Collection $finalEgzamsHistory;
/**
* @var Collection<int, ActivitiesGroupLecturerPositionActivities>
*/
#[ORM\OneToMany(mappedBy: 'lecturerPosition', targetEntity: ActivitiesGroupLecturerPositionActivities::class, orphanRemoval: true)]
private Collection $activitiesGroupLecturerPositionActivities;
/**
* @var Collection<int, LecturerAgreement>
*/
#[ORM\OneToMany(mappedBy: 'lecturerPosition', targetEntity: LecturerAgreement::class)]
private Collection $lecturerAgreements;
public function __construct()
{
$this->finalEgzams = new ArrayCollection();
$this->finalProjects = new ArrayCollection();
$this->finalEgzamsHistory = new ArrayCollection();
$this->finalProjectsHistory = new ArrayCollection();
$this->lecturers = new ArrayCollection();
$this->lecturerPlans = new ArrayCollection();
$this->lecturerPlanHistorys = new ArrayCollection();
$this->activitiesGroupLecturerPositionActivities = new ArrayCollection();
$this->lecturerAgreements = new ArrayCollection();
}
/**
* @return Collection<int, FinalEgzam>
*/
public function getFinalEgzams(): Collection
{
return $this->finalEgzams;
}
public function setFinalEgzams($finalEgzams)
{
$this->finalEgzams = $finalEgzams;
return $this;
}
/**
* @return Collection<int, FinalEgzamHistory>
*/
public function getFinalEgzamsHistory(): Collection
{
return $this->finalEgzamsHistory;
}
public function setFinalEgzamsHistory($finalEgzamsHistory)
{
$this->finalEgzamsHistory = $finalEgzamsHistory;
return $this;
}
public function getShortName(): ?string
{
return $this->shortName;
}
public function setShortName(string $shortName): static
{
$this->shortName = $shortName;
return $this;
}
/**
* @return Collection<int, Lecturer>
*/
public function getLecturers(): Collection
{
return $this->lecturers;
}
public function setLecturers($lecturers)
{
$this->lecturers = $lecturers;
return $this;
}
public function __toString()
{
return $this->name;
}
public function getId(): ?int
{
return $this->id;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
/**
* @return Collection<int, LecturerPlan>
*/
public function getLecturerPlans(): Collection
{
return $this->lecturerPlans;
}
public function setLecturerPlans($lecturerPlans)
{
$this->lecturerPlans = $lecturerPlans;
return $this;
}
/**
* @return Collection<int, LecturerPlanHistory>
*/
public function getLecturerPlanHistorys(): Collection
{
return $this->lecturerPlanHistorys;
}
public function setLecturerPlanHistorys($lecturerPlanHistorys)
{
$this->lecturerPlanHistorys = $lecturerPlanHistorys;
return $this;
}
/**
* @return Collection<int, FinalProject>
*/
public function getFinalProjects(): Collection
{
return $this->finalProjects;
}
public function setFinalProjects($finalProjects)
{
$this->finalProjects = $finalProjects;
return $this;
}
/**
* @return Collection<int, FinalProjectHistory>
*/
public function getFinalProjectsHistory(): Collection
{
return $this->finalProjectsHistory;
}
public function setFinalProjectsHistory($finalProjectsHistory)
{
$this->finalProjectsHistory = $finalProjectsHistory;
return $this;
}
/**
* @return Collection<int, ActivitiesPlan>
*/
public function getActivitiesPlans(): Collection
{
return $this->activitiesPlans;
}
/**
* @param ArrayCollection $activitiesPlans
*
* @return $this
*/
public function setActivitiesPlans($activitiesPlans)
{
$this->activitiesPlans = $activitiesPlans;
return $this;
}
public function getIsForPlan(): ?int
{
return $this->isForPlan;
}
public function setIsForPlan(?int $isForPlan): static
{
$this->isForPlan = $isForPlan;
return $this;
}
/**
* @return Collection<int, ActivitiesGroupLecturerPositionActivities>
*/
public function getActivitiesGroupLecturerPositionActivities(): Collection
{
return $this->activitiesGroupLecturerPositionActivities;
}
public function addActivitiesGroupLecturerPositionActivity(ActivitiesGroupLecturerPositionActivities $activitiesGroupLecturerPositionActivity): static
{
if (!$this->activitiesGroupLecturerPositionActivities->contains($activitiesGroupLecturerPositionActivity)) {
$this->activitiesGroupLecturerPositionActivities->add($activitiesGroupLecturerPositionActivity);
$activitiesGroupLecturerPositionActivity->setLecturerPosition($this);
}
return $this;
}
public function removeActivitiesGroupLecturerPositionActivity(ActivitiesGroupLecturerPositionActivities $activitiesGroupLecturerPositionActivity): static
{
if ($this->activitiesGroupLecturerPositionActivities->removeElement($activitiesGroupLecturerPositionActivity)) {
// set the owning side to null (unless already changed)
if ($activitiesGroupLecturerPositionActivity->getLecturerPosition() === $this) {
$activitiesGroupLecturerPositionActivity->setLecturerPosition(null);
}
}
return $this;
}
/**
* @return Collection<int, LecturerAgreement>
*/
public function getLecturerAgreements(): Collection
{
return $this->lecturerAgreements;
}
public function addLecturerAgreement(LecturerAgreement $lecturerAgreement): static
{
if (!$this->lecturerAgreements->contains($lecturerAgreement)) {
$this->lecturerAgreements->add($lecturerAgreement);
$lecturerAgreement->setLecturerPosition($this);
}
return $this;
}
public function removeLecturerAgreement(LecturerAgreement $lecturerAgreement): static
{
if ($this->lecturerAgreements->removeElement($lecturerAgreement)) {
// set the owning side to null (unless already changed)
if ($lecturerAgreement->getLecturerPosition() === $this) {
$lecturerAgreement->setLecturerPosition(null);
}
}
return $this;
}
public function addLecturer(Lecturer $lecturer): static
{
if (!$this->lecturers->contains($lecturer)) {
$this->lecturers->add($lecturer);
$lecturer->setLecturerPosition($this);
}
return $this;
}
public function removeLecturer(Lecturer $lecturer): static
{
if ($this->lecturers->removeElement($lecturer)) {
// set the owning side to null (unless already changed)
if ($lecturer->getLecturerPosition() === $this) {
$lecturer->setLecturerPosition(null);
}
}
return $this;
}
public function addLecturerPlan(LecturerPlan $lecturerPlan): static
{
if (!$this->lecturerPlans->contains($lecturerPlan)) {
$this->lecturerPlans->add($lecturerPlan);
$lecturerPlan->setLecturerPosition($this);
}
return $this;
}
public function removeLecturerPlan(LecturerPlan $lecturerPlan): static
{
if ($this->lecturerPlans->removeElement($lecturerPlan)) {
// set the owning side to null (unless already changed)
if ($lecturerPlan->getLecturerPosition() === $this) {
$lecturerPlan->setLecturerPosition(null);
}
}
return $this;
}
public function addLecturerPlanHistory(LecturerPlanHistory $lecturerPlanHistory): static
{
if (!$this->lecturerPlanHistorys->contains($lecturerPlanHistory)) {
$this->lecturerPlanHistorys->add($lecturerPlanHistory);
$lecturerPlanHistory->setLecturerPosition($this);
}
return $this;
}
public function removeLecturerPlanHistory(LecturerPlanHistory $lecturerPlanHistory): static
{
if ($this->lecturerPlanHistorys->removeElement($lecturerPlanHistory)) {
// set the owning side to null (unless already changed)
if ($lecturerPlanHistory->getLecturerPosition() === $this) {
$lecturerPlanHistory->setLecturerPosition(null);
}
}
return $this;
}
public function addFinalProject(FinalProject $finalProject): static
{
if (!$this->finalProjects->contains($finalProject)) {
$this->finalProjects->add($finalProject);
$finalProject->setLecturerPosition($this);
}
return $this;
}
public function removeFinalProject(FinalProject $finalProject): static
{
if ($this->finalProjects->removeElement($finalProject)) {
// set the owning side to null (unless already changed)
if ($finalProject->getLecturerPosition() === $this) {
$finalProject->setLecturerPosition(null);
}
}
return $this;
}
public function addFinalEgzam(FinalEgzam $finalEgzam): static
{
if (!$this->finalEgzams->contains($finalEgzam)) {
$this->finalEgzams->add($finalEgzam);
$finalEgzam->setLecturerPosition($this);
}
return $this;
}
public function removeFinalEgzam(FinalEgzam $finalEgzam): static
{
if ($this->finalEgzams->removeElement($finalEgzam)) {
// set the owning side to null (unless already changed)
if ($finalEgzam->getLecturerPosition() === $this) {
$finalEgzam->setLecturerPosition(null);
}
}
return $this;
}
public function addFinalProjectsHistory(FinalProjectHistory $finalProjectsHistory): static
{
if (!$this->finalProjectsHistory->contains($finalProjectsHistory)) {
$this->finalProjectsHistory->add($finalProjectsHistory);
$finalProjectsHistory->setLecturerPosition($this);
}
return $this;
}
public function removeFinalProjectsHistory(FinalProjectHistory $finalProjectsHistory): static
{
if ($this->finalProjectsHistory->removeElement($finalProjectsHistory)) {
// set the owning side to null (unless already changed)
if ($finalProjectsHistory->getLecturerPosition() === $this) {
$finalProjectsHistory->setLecturerPosition(null);
}
}
return $this;
}
public function addFinalEgzamsHistory(FinalEgzamHistory $finalEgzamsHistory): static
{
if (!$this->finalEgzamsHistory->contains($finalEgzamsHistory)) {
$this->finalEgzamsHistory->add($finalEgzamsHistory);
$finalEgzamsHistory->setLecturerPosition($this);
}
return $this;
}
public function removeFinalEgzamsHistory(FinalEgzamHistory $finalEgzamsHistory): static
{
if ($this->finalEgzamsHistory->removeElement($finalEgzamsHistory)) {
// set the owning side to null (unless already changed)
if ($finalEgzamsHistory->getLecturerPosition() === $this) {
$finalEgzamsHistory->setLecturerPosition(null);
}
}
return $this;
}
public function addActivitiesPlan(ActivitiesPlan $activitiesPlan): static
{
if (!$this->activitiesPlans->contains($activitiesPlan)) {
$this->activitiesPlans->add($activitiesPlan);
$activitiesPlan->setLecturerPosition($this);
}
return $this;
}
public function removeActivitiesPlan(ActivitiesPlan $activitiesPlan): static
{
if ($this->activitiesPlans->removeElement($activitiesPlan)) {
// set the owning side to null (unless already changed)
if ($activitiesPlan->getLecturerPosition() === $this) {
$activitiesPlan->setLecturerPosition(null);
}
}
return $this;
}
}