false])] #[Assert\Type(type: 'boolean')] #[Assert\NotNull] #[Groups(['educationcurriculum', 'education_edit_educationcurriculums'])] private $isDisabled = false; /** * @var bool */ #[ORM\Column(type: 'boolean', options: ['default' => true])] #[Assert\Type(type: 'boolean')] #[Assert\NotNull] #[Groups(['educationcurriculum', 'education_edit_educationcurriculums'])] private $isActive = true; /** * @var integer */ #[ORM\Column(type: 'integer', nullable: true)] #[Assert\Type(type: 'integer', message: 'invalid-integer')] #[Groups(['educationcurriculum'])] private $duration; /** * @var integer */ #[ORM\Column(type: 'integer', nullable: true)] #[Assert\Type(type: 'integer', message: 'invalid-integer')] #[Groups(['educationcurriculum'])] private $nbStudentsMax; /** * @var integer */ #[ORM\Column(type: 'integer', nullable: true)] #[Assert\Type(type: 'integer', message: 'invalid-integer')] #[Groups(['educationcurriculum'])] private $nbStudentsByCourse; /** * @var integer */ #[ORM\Column(type: 'integer', nullable: true)] #[Assert\Type(type: 'integer', message: 'invalid-integer')] #[Groups(['educationcurriculum'])] private $packingRate; /** * @var ArrayCollection */ #[ORM\OneToMany(targetEntity: 'EducationStudent', mappedBy: 'educationCurriculum', cascade: ['persist'])] #[Groups(['education_educationstudent'])] private $educationStudent; /** * @var integer */ #[ORM\Column(type: 'integer', nullable: true)] #[Assert\Type(type: 'integer')] #[Groups(['education_edit_educationcurriculums', 'educationcurriculum', 'educations_quotas_stats_educationcurriculums'])] private $availablePlaces; /** * @var integer */ #[Groups(['educations_quotas_stats_educationcurriculums'])] private $totalEducationStudents; /** * @var integer */ #[Groups(['educations_quotas_stats_educationcurriculums'])] private $fillingRate; /** * @var integer */ #[Groups(['educations_quotas_stats_educationcurriculums'])] private $order; /** * @var string * @ExportSplitFields({"education.educationCategory.label","education.educationComplementTemplate","cycle.label","year","level"}) */ #[Groups(['intangible_list_educationcurriculums', 'planning_detail_educationcurriculum', 'educationcurriculum', 'student_list_educationstudent', 'educationnotation_list_educationstudent', 'education_student_next_year_educationcurriculum', 'education_student_next_year_educationstudentlastyear', 'education_input_list_educationcurriculum', 'access_intangible_list_intangible', 'educations_quotas_stats_educationcurriculums'])] private $fullLabelTemplate; /** * @var string * @ExportSplitFields({"cycle.label","year","level"}) */ #[Groups(['examenconvocation_list_examen'])] private $cycleYearLevelTemplate; /** * Only for elasticsearch... * @var string */ private $fullLabelElastic; /** * @var EducationNotationConfig */ #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\EducationNotationConfig', inversedBy: 'educationCurriculums')] #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')] #[Groups(['educationcurriculum', 'educationcurriculum_reference'])] private $educationNotationConfig; #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Education\EducationTiming', inversedBy: 'educationCurriculums')] #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])] #[ORM\JoinColumn(name: 'educationCurriculum_id', referencedColumnName: 'id')] #[ORM\JoinColumn(name: 'educationTiming_id', referencedColumnName: 'id')] #[Groups(['education_edit_educationcurriculums', 'educationcurriculum', 'educationcurriculum_reference'])] private $educationTimings; /** * Constructor */ public function __construct() { $this->educationStudent = new ArrayCollection(); $this->educationTimings = new ArrayCollection(); } /** * Sets legacyId. * * @param string $legacyId * * @return $this */ public function setLegacyId($legacyId) { $this->legacyId = $legacyId; return $this; } /** * Gets legacyId. * * @return string */ public function getLegacyId() { return $this->legacyId; } /** * Sets id. * * @param int $id * * @return $this */ public function setId($id) { $this->id = $id; return $this; } /** * Gets id. * * @return int */ public function getId() { return $this->id; } /** * Sets education. * * @param Education $education * * @return $this */ public function setEducation($education) { $this->education = $education; return $this; } /** * Gets education. * * @return Education */ public function getEducation() { return $this->education; } /** * Sets cycle. * * @param string $cycle * * @return $this */ public function setCycle($cycle) { $this->cycle = $cycle; return $this; } /** * Gets cycle. * * @return string */ public function getCycle() { return $this->cycle; } /** * Sets year. * * @param integer $year * * @return $this */ public function setYear($year) { $this->year = $year; return $this; } /** * Gets year. * * @return integer */ public function getYear() { return $this->year; } /** * Sets level. * * @param string $level * * @return $this */ public function setLevel($level) { $this->level = $level; return $this; } /** * Gets level. * * @return string */ public function getLevel() { return $this->level; } /** * Sets endDate. * * @param \DateTime $endDate * * @return $this */ public function setEndDate(\DateTime $endDate = null) { $this->endDate = $endDate; return $this; } /** * Gets endDate. * * @return \DateTime */ public function getEndDate() { return $this->endDate ? $this->endDate->format('Y-m-d') : $this->endDate; } /** * Set isActive * * @param boolean $isActive * * @return CycleByNotation */ public function setIsActive($isActive) { $this->isActive = $isActive; return $this; } /** * Get isActive * * @return boolean */ public function getIsActive() { return $this->isActive; } /** * @param $isDisabled * @return $this */ public function setIsDisabled($isDisabled) { $this->isDisabled = $isDisabled; return $this; } /** * @return bool */ public function getIsDisabled() { return $this->isDisabled; } /** * Sets duration. * * @param integer $duration * * @return $this */ public function setDuration($duration) { $this->duration = $duration; return $this; } /** * Gets duration. * * @return integer */ public function getDuration() { return $this->duration; } /** * Sets nb students max. * * @param integer $nbStudentsMax * * @return $this */ public function setNbStudentsMax($nbStudentsMax) { $this->nbStudentsMax = $nbStudentsMax; return $this; } /** * Gets nbStudentsMax. * * @return integer */ public function getNbStudentsMax() { return $this->nbStudentsMax; } /** * Sets nbStudentsByCourse. * * @param integer $nbStudentsByCourse * * @return $this */ public function setNbStudentsByCourse($nbStudentsByCourse) { $this->nbStudentsByCourse = $nbStudentsByCourse; return $this; } /** * Gets nbStudentsByCourse. * * @return integer */ public function getNbStudentsByCourse() { return $this->nbStudentsByCourse; } /** * Gets packingRate. * * @return integer */ public function getPackingRate() { return $this->packingRate; } /** * Set packingRate * * @param integer $packingRate * * @return EducationCurriculum */ public function setPackingRate($packingRate) { $this->packingRate = $packingRate; return $this; } /** * Add educationStudent * * @param \AppBundle\Entity\Education\EducationStudent $educationStudent * * @return EducationCurriculum */ public function addEducationStudent(\AppBundle\Entity\Education\EducationStudent $educationStudent) { $this->educationStudent[] = $educationStudent; return $this; } /** * Remove educationStudent * * @param \AppBundle\Entity\Education\EducationStudent $educationStudent */ public function removeEducationStudent(\AppBundle\Entity\Education\EducationStudent $educationStudent) { $this->educationStudent->removeElement($educationStudent); } /** * Get educationStudent * * @return \Doctrine\Common\Collections\Collection */ public function getEducationStudent() { return $this->educationStudent; } /** * Gets full label. * * @return array */ public function getFullLabelTemplate() { return [ $this->getEducation()->getEducationCategory()->getLabel(), $this->getEducation()->getEducationComplementTemplate(), $this->getCycle() && $this->getCycle()->getLabel() !== 'NO_CYCLE' ? $this->getCycle()->getLabel() : '', ['value' => $this->getYear(), 'translate' => true], $this->getLevel() ]; } /** * Gets full label. * * @return array */ public function getCycleYearLevelTemplate() { return [ $this->getCycle() && $this->getCycle()->getLabel() !== 'NO_CYCLE' ? $this->getCycle()->getLabel() : '', ['value' => $this->getYear(), 'translate' => true], $this->getLevel() ]; } /** * Gets full label. * * @return array */ public function getFullLabelElastic() { return $this->getLevel(); } /** * Set availablePlaces * * @param integer $availablePlaces * * @return EducationCurriculum */ public function setAvailablePlaces($availablePlaces) { $this->availablePlaces = $availablePlaces; return $this; } /** * Get availablePlaces * * @return integer */ public function getAvailablePlaces() { return $this->availablePlaces; } /** * Set totalEducationStudents * * @param integer $totalEducationStudents * * @return EducationCurriculum */ public function setTotalEducationStudents($totalEducationStudents) { $this->totalEducationStudents = $totalEducationStudents; return $this; } /** * Get totalEducationStudents * * @return integer */ public function getTotalEducationStudents() { return $this->totalEducationStudents; } /** * Set $fillingRate * * @param integer $fillingRate * * @return EducationCurriculum */ public function setFillingRate($fillingRate) { $this->fillingRate = $fillingRate; return $this; } /** * Get $fillingRate * * @return integer */ public function getFillingRate() { return $this->fillingRate; } /** * Set $order * * @param integer $order * * @return EducationCurriculum */ public function setOrder($order) { $this->order = $order; return $this; } /** * Get $order * * @return integer */ public function getOrder() { return $this->order; } /** * Sets educationNotationConfig. * * @param $educationNotationConfig * * @return $this */ public function setEducationNotationConfig($educationNotationConfig) { $this->educationNotationConfig = $educationNotationConfig; return $this; } /** * Gets educationNotationConfig. * * @return EducationNotationConfig */ public function getEducationNotationConfig() { return $this->educationNotationConfig; } /** * Add $educationTiming * * @param \AppBundle\Entity\Education\EducationTiming $educationTiming * * @return EducationCurriculum */ public function addEducationTiming(\AppBundle\Entity\Education\EducationTiming $educationTiming) { $this->educationTimings[] = $educationTiming; return $this; } /** * Remove $educationTiming * * @param \AppBundle\Entity\Education\EducationTiming $educationTiming */ public function removeEducationTiming(\AppBundle\Entity\Education\EducationTiming $educationTiming) { /** @var EducationStudent $educationStudent */ foreach ($this->getEducationStudent() as $educationStudent){ if($educationStudent->getEducationTiming() && $educationStudent->getEducationTiming()->getId() === $educationTiming->getId()){ $educationStudent->setEducationTiming(null); } } $this->educationTimings->removeElement($educationTiming); } /** * Get EducationTiming * * @return \Doctrine\Common\Collections\Collection */ public function getEducationTimings() { return $this->educationTimings; } }