*/ #[Assert\Valid] #[ORM\ManyToMany(targetEntity: 'OpeningHoursSpecification', cascade: ['persist'], orphanRemoval: true)] #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])] #[ORM\JoinColumn(name: 'room_id', referencedColumnName: 'id')] #[ORM\JoinColumn(name: 'openinghoursspecification_id', referencedColumnName: 'id', unique: true)] #[Groups(['room_openinghoursspecification'])] private $openingHoursSpecification; // /** // * @var ArrayCollection // */ // #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\ContactPoint')] // #[Groups(['room_contactpoint'])] // // private $contactpoint; // /** // * @var ArrayCollection // */ // #[Assert\Valid] // #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Product\Equipment', cascade: ['persist'])] // #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])] // #[ORM\JoinColumn(name: 'room_id', referencedColumnName: 'id')] // #[ORM\JoinColumn(name: 'equipment_id', referencedColumnName: 'id', unique: true)] // #[Groups(['room_equipment'])] // private $equipments; /** * @var ArrayCollection */ #[Assert\Valid] #[ORM\OneToMany(targetEntity: 'RoomControl', mappedBy: 'room', cascade: ['persist'], orphanRemoval: true)] #[ORM\JoinColumn(nullable: false)] #[Groups(['room_control'])] private $controls; /** * @var ArrayCollection */ #[Assert\Valid] #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Place\RoomRepair', mappedBy: 'room', cascade: ['persist'], orphanRemoval: true)] #[ORM\JoinColumn(nullable: false)] #[Groups(['room_repair'])] private $repairs; /** * @var ArrayCollection */ #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Course', mappedBy: 'room')] #[Groups(['room_booking'])] private $courses; /** * @var ArrayCollection */ #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', mappedBy: 'room')] #[Groups(['room_booking'])] private $educationalProjects; /** * @var ArrayCollection */ #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Event', mappedBy: 'room')] #[Groups(['room_booking'])] private $events; /** * @var ArrayCollection */ #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Examen', mappedBy: 'room')] #[Groups(['room_booking'])] private $examens; /** * @var ArrayCollection */ #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Equipment', mappedBy: 'roomStorage')] #[Groups(['room_equipment'])] private $equipmentStorages; /** * @var ArrayCollection */ #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Equipment', mappedBy: 'roomWhereIsUsed')] #[Groups(['room_equipment'])] private $equipmentUseds; /** * @var array * @ExportSplitFields({"name","description","localisation","floorSize","capacity"}) * */ #[Groups(['template'])] private $fullLabelTemplate; public function __construct() { $this->openingHoursSpecification = new ArrayCollection(); // $this->contactpoint = new ArrayCollection(); // $this->equipments = new ArrayCollection(); $this->repairs = new ArrayCollection(); $this->controls = new ArrayCollection(); $this->courses = new ArrayCollection(); $this->educationalProjects = new ArrayCollection(); $this->events = new ArrayCollection(); $this->examens = new ArrayCollection(); $this->equipmentStorages = new ArrayCollection(); $this->equipmentUseds = new ArrayCollection(); } /** * 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 place. * * @param Place $place * * @return $this */ public function setPlace(Place $place) { $this->place = $place; return $this; } /** * Gets place. * * @return Place */ public function getPlace() { return $this->place; } /** * Sets name. * * @param string $name * * @return $this */ public function setName($name) { $this->name = $name; return $this; } /** * Gets name. * * @return string */ public function getName() { return $this->name; } /** * Sets floorSize. * * @param int $floorSize * * @return $this */ public function setFloorSize($floorSize) { $this->floorSize = $floorSize; return $this; } /** * Gets floorSize. * * @return int */ public function getFloorSize() { return $this->floorSize; } /** * Sets description. * * @param string $description * * @return $this */ public function setDescription($description) { $this->description = $description; return $this; } /** * Gets description. * * @return string */ public function getDescription() { return $this->description; } /** * Sets localisation. * * @param string $localisation * * @return $this */ public function setLocalisation($localisation) { $this->localisation = $localisation; return $this; } /** * Gets localisation. * * @return string */ public function getLocalisation() { return $this->localisation; } /** * Sets capacity. * * @param int $capacity * * @return $this */ public function setCapacity($capacity) { $this->capacity = $capacity; return $this; } /** * Gets capacity. * * @return int */ public function getCapacity() { return $this->capacity; } /** * Adds openingHoursSpecification. * * @param OpeningHoursSpecification $openingHoursSpecification * * @return $this */ public function addOpeningHoursSpecification(OpeningHoursSpecification $openingHoursSpecification) { $this->openingHoursSpecification[] = $openingHoursSpecification; return $this; } /** * Removes openingHoursSpecification. * * @param OpeningHoursSpecification $openingHoursSpecification * * @return $this */ public function removeOpeningHoursSpecification(OpeningHoursSpecification $openingHoursSpecification) { $this->openingHoursSpecification->removeElement($openingHoursSpecification); return $this; } /** * Gets openingHoursSpecification. * * @return ArrayCollection */ public function getOpeningHoursSpecification() { return $this->openingHoursSpecification; } // /** // * Adds contactpoint. // * // * @param ContactPoint $contactpoint // * // * @return $this // */ // public function addContactpoint(ContactPoint $contactpoint) // { // $this->contactpoint[] = $contactpoint; // return $this; // } // /** // * Removes contactpoint. // * // * @param ContactPoint $contactpoint // * // * @return $this // */ // public function removeContactpoint(ContactPoint $contactpoint) // { // $this->contactpoint->removeElement($contactpoint); // return $this; // } // /** // * Gets contactpoint. // * // * @return ArrayCollection // */ // public function getContactpoint() // { // return $this->contactpoint; // } /** * Adds control. * * @param RoomControl $control * * @return $this */ public function addControl(RoomControl $control) { $control->setRoom($this); $this->controls[] = $control; return $this; } /** * Removes control. * * @param RoomControl $control * * @return $this */ public function removeControl(RoomControl $control) { $this->controls->removeElement($control); return $this; } /** * Gets control. * * @return ArrayCollection */ public function getControls() { return $this->controls; } /** * Adds repair. * * @param RoomRepair $repair * * @return $this */ public function addRepair(RoomRepair $repair) { $repair->setRoom($this); $this->repairs[] = $repair; return $this; } /** * Removes repair. * * @param RoomRepair $repair * * @return $this */ public function removeRepair(RoomRepair $repair) { $this->repairs->removeElement($repair); return $this; } /** * Gets repairs. * * @return ArrayCollection */ public function getRepairs() { return $this->repairs; } // /** // * Add equipment // * // * @param \AppBundle\Entity\Product\Equipment $equipment // * // * @return Room // */ // public function addEquipment(\AppBundle\Entity\Product\Equipment $equipment) // { // $this->equipments[] = $equipment; // return $this; // } // /** // * Remove equipment // * // * @param \AppBundle\Entity\Product\Equipment $equipment // */ // public function removeEquipment(\AppBundle\Entity\Product\Equipment $equipment) // { // $this->equipments->removeElement($equipment); // } // /** // * Get equipments // * // * @return \Doctrine\Common\Collections\Collection // */ // public function getEquipments() // { // return $this->equipments; // } /** * Add course * * @param \AppBundle\Entity\Booking\Course $course * * @return Room */ public function addCourse(\AppBundle\Entity\Booking\Course $course) { $this->courses[] = $course; return $this; } /** * Remove course * * @param \AppBundle\Entity\Booking\Course $course */ public function removeCourse(\AppBundle\Entity\Booking\Course $course) { $this->courses->removeElement($course); } /** * Get courses * * @return \Doctrine\Common\Collections\Collection */ public function getCourses() { return $this->courses; } /** * Add educationalProject * * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject * * @return Room */ public function addEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject) { $this->educationalProjects[] = $educationalProject; return $this; } /** * Remove educationalProject * * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject */ public function removeEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject) { $this->educationalProjects->removeElement($educationalProject); } /** * Get educationalProjects * * @return \Doctrine\Common\Collections\Collection */ public function getEducationalProjects() { return $this->educationalProjects; } /** * Add event * * @param \AppBundle\Entity\Booking\Event $event * * @return Room */ public function addEvent(\AppBundle\Entity\Booking\Event $event) { $this->events[] = $event; return $this; } /** * Remove event * * @param \AppBundle\Entity\Booking\Event $event */ public function removeEvent(\AppBundle\Entity\Booking\Event $event) { $this->events->removeElement($event); } /** * Get events * * @return \Doctrine\Common\Collections\Collection */ public function getEvents() { return $this->events; } /** * Add examen * * @param \AppBundle\Entity\Booking\Examen $examen * * @return Room */ public function addExamen(\AppBundle\Entity\Booking\Examen $examen) { $this->examens[] = $examen; return $this; } /** * Remove examen * * @param \AppBundle\Entity\Booking\Examen $examen */ public function removeExamen(\AppBundle\Entity\Booking\Examen $examen) { $this->examens->removeElement($examen); } /** * Get examens * * @return \Doctrine\Common\Collections\Collection */ public function getExamens() { return $this->examens; } /** * Add equipmentStorage * * @param \AppBundle\Entity\Product\Equipment $equipmentStorage * * @return Room */ public function addEquipmentStorage(\AppBundle\Entity\Product\Equipment $equipmentStorage) { $this->equipmentStorages[] = $equipmentStorage; return $this; } /** * Remove equipmentStorage * * @param \AppBundle\Entity\Product\Equipment $equipmentStorage */ public function removeEquipmentStorage(\AppBundle\Entity\Product\Equipment $equipmentStorage) { $this->equipmentStorages->removeElement($equipmentStorage); } /** * Get equipmentStorages * * @return \Doctrine\Common\Collections\Collection */ public function getEquipmentStorages() { return $this->equipmentStorages; } /** * Add equipmentUsed * * @param \AppBundle\Entity\Product\Equipment $equipmentUsed * * @return Room */ public function addEquipmentUsed(\AppBundle\Entity\Product\Equipment $equipmentUsed) { $equipmentUsed->setRoomWhereIsUsed($this); $this->equipmentUseds[] = $equipmentUsed; return $this; } /** * Remove equipmentUsed * * @param \AppBundle\Entity\Product\Equipment $equipmentUsed */ public function removeEquipmentUsed(\AppBundle\Entity\Product\Equipment $equipmentUsed) { $equipmentUsed->setRoomWhereIsUsed(null); $this->equipmentUseds->removeElement($equipmentUsed); } /** * Get equipmentUseds * * @return \Doctrine\Common\Collections\Collection */ public function getEquipmentUseds() { return $this->equipmentUseds; } /** * * {@inheritdoc} */ public function getContact() { return $this; } /** * * {@inheritdoc} */ public function getContactAddress() { return $this->getPlace()->getContactAddress(); } /** * * {@inheritdoc} */ public function getContactName() { return $this->getName(); } /** * * {@inheritdoc} */ public function getContactContactPoint() { return $this->getContactPointPrincipal(); } /** * Gets full label. * * @return array */ public function getFullLabelTemplate() { return [ $this->getName(), $this->getDescription(), $this->getLocalisation(), $this->getFloorSize(), $this->getCapacity() ]; } }