*/ #[ORM\OneToMany(targetEntity: BovinShipment::class, mappedBy: 'id_type')] #[Groups(['shipment:read', 'shipment:write', 'bovine-type:read', 'bovine-type:write'])] private Collection $bovinShipments; public function __construct() { $this->bovinShipments = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTypeLabel(): ?string { return $this->type_label; } public function setTypeLabel(string $type_label): static { $this->type_label = $type_label; return $this; } public function getTypeCode(): ?string { return $this->type_code; } public function setTypeCode(string $type_code): static { $this->type_code = $type_code; return $this; } public function getBovineShipment(): ?BovineShipment { return $this->bovineShipment; } public function setBovineShipment(?BovineShipment $bovineShipment): static { $this->bovineShipment = $bovineShipment; return $this; } /** * @return Collection */ public function getBovinShipments(): Collection { return $this->bovinShipments; } public function addBovinShipment(BovinShipment $bovinShipment): static { if (!$this->bovinShipments->contains($bovinShipment)) { $this->bovinShipments->add($bovinShipment); $bovinShipment->setIdType($this); } return $this; } public function removeBovinShipment(BovinShipment $bovinShipment): static { if ($this->bovinShipments->removeElement($bovinShipment)) { // set the owning side to null (unless already changed) if ($bovinShipment->getIdType() === $this) { $bovinShipment->setIdType(null); } } return $this; } }