<?phpnamespace App\Entity;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use App\Entity\SchoolType;class School { /** * @var int */ private $id; /** * @var string */ private $name; /** * @var string */ private $schoolNumber; /** * @var string */ private $url; /** * @var boolean */ private $isActive = true; /** * @var \DateTime */ private $createdAt; /** * @var \App\Entity\Communication */ private $communication; /** * @var \Doctrine\Common\Collections\Collection */ private $schoolClasses; /** * @var \Doctrine\Common\Collections\Collection */ private $schoolDirectorMappings; /** * @var \Doctrine\Common\Collections\Collection */ private $schoolTeacherMappings; /** * @var \Doctrine\Common\Collections\Collection */ private $schoolTypes; /** * @var \App\Entity\Address */ private $address; /** * @var \App\Entity\SchoolProfile */ private $schoolProfile; /** * @var \Doctrine\Common\Collections\Collection */ private $jobSchools; /** * @var \Doctrine\Common\Collections\Collection */ private $interestFields; /** * Constructor */ public function __construct() { $this->interestFields = new \Doctrine\Common\Collections\ArrayCollection(); $this->jobSchools = new \Doctrine\Common\Collections\ArrayCollection(); $this->schoolClasses = new \Doctrine\Common\Collections\ArrayCollection(); $this->schoolDirectorMappings = new \Doctrine\Common\Collections\ArrayCollection(); $this->schoolTeacherMappings = new \Doctrine\Common\Collections\ArrayCollection(); $this->schoolTypes = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set name * * @param string $name * * @return School */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set schoolNumber * * @param string $schoolNumber * * @return School */ public function setSchoolNumber($schoolNumber) { $this->schoolNumber = $schoolNumber; return $this; } /** * Get schoolNumber * * @return string */ public function getSchoolNumber() { return $this->schoolNumber; } /** * Set url * * @param string $url * * @return School */ public function setUrl($url) { $this->url = $url; return $this; } /** * Get url * * @return string */ public function getUrl() { return $this->url; } /** * Set isActive * * @param boolean $isActive * * @return School */ public function setIsActive($isActive) { $this->isActive = $isActive; return $this; } /** * Get isActive * * @return boolean */ public function getIsActive() { return $this->isActive; } /** * Set createdAt * * @param \DateTime $createdAt * * @return School */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get createdAt * * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * Set communication * * @param \App\Entity\Communication $communication * * @return School */ public function setCommunication(\App\Entity\Communication $communication = null) { $this->communication = $communication; return $this; } /** * Get communication * * @return \App\Entity\Communication */ public function getCommunication() { return $this->communication; } /** * Add schoolClass * * @param \App\Entity\SchoolClass $schoolClass * * @return School */ public function addSchoolClass(\App\Entity\SchoolClass $schoolClass) { $this->schoolClasses[] = $schoolClass; return $this; } /** * Remove schoolClass * * @param \App\Entity\SchoolClass $schoolClass */ public function removeSchoolClass(\App\Entity\SchoolClass $schoolClass) { $this->schoolClasses->removeElement($schoolClass); } /** * Get schoolClasses * * @return \Doctrine\Common\Collections\Collection */ public function getSchoolClasses() { return $this->schoolClasses; } /** * Add schoolDirectorMapping * * @param \App\Entity\SchoolDirectorMapping $schoolDirectorMapping * * @return School */ public function addSchoolDirectorMapping(\App\Entity\SchoolDirectorMapping $schoolDirectorMapping) { $this->schoolDirectorMappings[] = $schoolDirectorMapping; return $this; } /** * Remove schoolDirectorMapping * * @param \App\Entity\SchoolDirectorMapping $schoolDirectorMapping */ public function removeSchoolDirectorMapping(\App\Entity\SchoolDirectorMapping $schoolDirectorMapping) { $this->schoolDirectorMappings->removeElement($schoolDirectorMapping); } /** * Get schoolDirectorMappings * * @return \Doctrine\Common\Collections\Collection */ public function getSchoolDirectorMappings() { return $this->schoolDirectorMappings; } /** * Add schoolTeacherMapping * * @param \App\Entity\SchoolTeacherMapping $schoolTeacherMapping * * @return School */ public function addSchoolTeacherMapping(\App\Entity\SchoolTeacherMapping $schoolTeacherMapping) { $this->schoolTeacherMappings[] = $schoolTeacherMapping; return $this; } /** * Remove schoolTeacherMapping * * @param \App\Entity\SchoolTeacherMapping $schoolTeacherMapping */ public function removeSchoolTeacherMapping(\App\Entity\SchoolTeacherMapping $schoolTeacherMapping) { $this->schoolTeacherMappings->removeElement($schoolTeacherMapping); } /** * Get schoolTeacherMappings * * @return \Doctrine\Common\Collections\Collection */ public function getSchoolTeacherMappings() { return $this->schoolTeacherMappings; } /** * Add schoolType * * @param \App\Entity\SchoolType $schoolType * * @return School */ public function addSchoolType(\App\Entity\SchoolType $schoolType) { $this->schoolTypes[] = $schoolType; return $this; } /** * Remove schoolType * * @param \App\Entity\SchoolType $schoolType */ public function removeSchoolType(\App\Entity\SchoolType $schoolType) { $this->schoolTypes->removeElement($schoolType); } /** * Get schoolTypes * * @return \Doctrine\Common\Collections\Collection */ public function getSchoolTypes() { return $this->schoolTypes; } /** * Set address. * * @param \App\Entity\Address|null $address * * @return School */ public function setAddress(\App\Entity\Address $address = null) { $this->address = $address; return $this; } /** * Get address. * * @return \App\Entity\Address|null */ public function getAddress() { return $this->address; } /** * Set schoolProfile. * * @param \App\Entity\SchoolProfile|null $schoolProfile * * @return School */ public function setSchoolProfile(\App\Entity\SchoolProfile $schoolProfile = null) { $this->schoolProfile = $schoolProfile; return $this; } /** * Get schoolProfile. * * @return \App\Entity\SchoolProfile|null */ public function getSchoolProfile() { return $this->schoolProfile; } /** * Add jobSchool. * * @param \App\Entity\JobSchool $jobSchool * * @return School */ public function addJobSchool(\App\Entity\JobSchool $jobSchool) { $this->jobSchools[] = $jobSchool; return $this; } /** * Remove jobSchool. * * @param \App\Entity\JobSchool $jobSchool * * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. */ public function removeJobSchool(\App\Entity\JobSchool $jobSchool) { return $this->jobSchools->removeElement($jobSchool); } /** * Get jobSchools. * * @return \Doctrine\Common\Collections\Collection */ public function getJobSchools() { return $this->jobSchools; } /** * Add interestField * * @param \App\Entity\InterestField $interestField * * @return Job */ public function addInterestField(\App\Entity\InterestField $interestField) { $this->interestFields[] = $interestField; return $this; } /** * Remove interestField * * @param \App\Entity\InterestField $interestField */ public function removeInterestField(\App\Entity\InterestField $interestField) { $this->interestFields->removeElement($interestField); } /** * Get interestField * * @return \Doctrine\Common\Collections\Collection */ public function getInterestFields() { return $this->interestFields; } public function getSchoolTypesText() { $text = ''; /* @var $schoolType SchoolType */ foreach ($this->schoolTypes as $schoolType) { $text = $text . $schoolType->getShortName() . ', '; } if (strlen($text) > 1) { $text = substr($text, 0, -2); } return $text; } public function isPTS() { /* @var $schoolType SchoolType */ foreach ($this->schoolTypes as $schoolType) { if ($schoolType->getId() == 4) { return true; } } return false; } public function isNMS() { /* @var $schoolType SchoolType */ foreach ($this->schoolTypes as $schoolType) { if ($schoolType->getId() == 2) { return true; } } return false; } public function isASO() { /* @var $schoolType SchoolType */ foreach ($this->schoolTypes as $schoolType) { if ($schoolType->getId() == 3) { return true; } } return false; } public function getHttpUrl() { if (empty($this->url)) { return ''; } $urlLower = strtolower($this->url); $prefix = ''; if (strpos($this->url, 'http') == FALSE) { $prefix = 'https://'; } return $prefix . $urlLower; } /** * @var \Doctrine\Common\Collections\Collection */ private $schoolAwards; /** * Add schoolAward. * * @param \App\Entity\SchoolAward $schoolAward * * @return School */ public function addSchoolAward(\App\Entity\SchoolAward $schoolAward) { $this->schoolAwards[] = $schoolAward; return $this; } /** * Remove schoolAward. * * @param \App\Entity\SchoolAward $schoolAward * * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. */ public function removeSchoolAward(\App\Entity\SchoolAward $schoolAward) { return $this->schoolAwards->removeElement($schoolAward); } /** * Get schoolAwards. * * @return \Doctrine\Common\Collections\Collection */ public function getSchoolAwards() { return $this->schoolAwards; }}