src/Entity/Material.php line 13
<?phpnamespace App\Entity;use App\Repository\MaterialRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Symfony\Component\Serializer\Annotation\Groups;use Vich\UploaderBundle\Mapping\Annotation as Vich;#[ORM\Entity(repositoryClass: MaterialRepository::class)]#[Vich\Uploadable]class Material{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column(type: "integer")]#[Groups(["products"])]private $id;#[ORM\Column(type: "string", length: 255)]#[Groups(["products"])]private $title;#[ORM\Column(type: "string", length: 2048, nullable: true)]#[Groups(["products"])]private $description;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $thumbnail;#[Vich\UploadableField(mapping: "product_images", fileNameProperty: "thumbnail")]private $thumbnailFile;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $colorHex;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $albedoTexture;#[Vich\UploadableField(mapping: "textures", fileNameProperty: "albedoTexture")]private $albedoTextureFile;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $normalMapTexture;#[Vich\UploadableField(mapping: "textures", fileNameProperty: "normalMapTexture")]private $normalMapTextureFile;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $metallicMapTexture;#[Vich\UploadableField(mapping: "textures", fileNameProperty: "metallicMapTexture")]private $metallicMapTextureFile;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $heightMapTexture;#[Vich\UploadableField(mapping: "textures", fileNameProperty: "heightMapTexture")]private $heightMapTextureFile;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $occlusionMapTexture;#[Vich\UploadableField(mapping: "textures", fileNameProperty: "occlusionMapTexture")]private $occlusionMapTextureFile;#[ORM\Column(type: "float", nullable: true)]#[Groups(["products"])]private $opacity;#[ORM\Column(type: "datetime", nullable: true)]#[Groups(["products"])]private ?\DateTime $updatedAt;#[ORM\ManyToMany(targetEntity: "Pfosten", mappedBy: "compatibleMaterial")]private $pfosten;#[ORM\ManyToMany(targetEntity: "Zaunelement", mappedBy: "compatibleMaterial")]private $zaunelement;#[ORM\ManyToMany(targetEntity: "Terrasse", mappedBy: "compatibleMaterial")]private $terrasse;#[ORM\ManyToMany(targetEntity: "Accessories", mappedBy: "compatibleMaterial")]private $accessories;#[ORM\Column(type: "float", nullable: true)]#[Groups(["products"])]private $textureTilingX;#[ORM\Column(type: "float", nullable: true)]#[Groups(["products"])]private $textureTilingY;#[ORM\Column(type: "float", nullable: true)]#[Groups(["products"])]private $smoothness;#[ORM\Column(type: "float", nullable: true)]#[Groups(["products"])]private $heightMapIntensity;#[ORM\Column(type: "float", nullable: true)]#[Groups(["products"])]private $normalMapIntensity;#[ORM\Column(type: "float", nullable: true)]#[Groups(["products"])]private $occlusionMapIntensity;#[ORM\Column(type: "float", nullable: true)]#[Groups(["products"])]private $metallicMapIntensity;public function getId(): ?int{return $this->id;}public function getTitle(): ?string{return $this->title;}public function setTitle(string $title): self{$this->title = $title;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): self{$this->description = $description;return $this;}public function getThumbnail(): ?string{return $this->thumbnail;}public function setThumbnail(?string $thumbnail): self{$this->thumbnail = $thumbnail;return $this;}public function getColorHex(): ?string{return $this->colorHex;}public function setColorHex(?string $colorHex): self{$this->colorHex = $colorHex;return $this;}public function getAlbedoTexture(): ?string{return $this->albedoTexture;}public function setAlbedoTexture(?string $albedoTexture): self{$this->albedoTexture = $albedoTexture;return $this;}public function getNormalMapTexture(): ?string{return $this->normalMapTexture;}public function setNormalMapTexture(?string $normalMapTexture): self{$this->normalMapTexture = $normalMapTexture;return $this;}public function getMetallicMapTexture(): ?string{return $this->metallicMapTexture;}public function setMetallicMapTexture(?string $metallicMapTexture): self{$this->metallicMapTexture = $metallicMapTexture;return $this;}public function getHeightMapTexture(): ?string{return $this->heightMapTexture;}public function setHeightMapTexture(?string $heightMapTexture): self{$this->heightMapTexture = $heightMapTexture;return $this;}public function getOcclusionMapTexture(): ?string{return $this->occlusionMapTexture;}public function setOcclusionMapTexture(?string $occlusionMapTexture): self{$this->occlusionMapTexture = $occlusionMapTexture;return $this;}public function getOpacity(): ?float{return $this->opacity;}public function setOpacity(?float $opacity): self{$this->opacity = $opacity;return $this;}/*** @param File|null $thumbnail*/public function setThumbnailFile(File $thumbnail = null){$this->thumbnailFile = $thumbnail;//exit(var_dump($thumbnail));// VERY IMPORTANT:// It is required that at least one field changes if you are using Doctrine,// otherwise the event listeners won't be called and the file is lostif ($thumbnail) {// if 'updatedAt' is not defined in your entity, use another property$this->updatedAt = new \DateTime('now');}}/*** @return null|File*/public function getThumbnailFile(): ?File{return $this->thumbnailFile;}/*** @param File|null $albedoTextureFile*/public function setAlbedoTextureFile(File $albedoTextureFile = null){$this->albedoTextureFile = $albedoTextureFile;// VERY IMPORTANT:// It is required that at least one field changes if you are using Doctrine,// otherwise the event listeners won't be called and the file is lostif ($albedoTextureFile) {// if 'updatedAt' is not defined in your entity, use another property$this->updatedAt = new \DateTime('now');}}/*** @return File*/public function getAlbedoTextureFile(){return $this->albedoTextureFile;}/*** @param File|null $normalMapTextureFile*/public function setNormalMapTextureFile(File $normalMapTextureFile = null){$this->normalMapTextureFile = $normalMapTextureFile;// VERY IMPORTANT:// It is required that at least one field changes if you are using Doctrine,// otherwise the event listeners won't be called and the file is lostif ($normalMapTextureFile) {// if 'updatedAt' is not defined in your entity, use another property$this->updatedAt = new \DateTime('now');}}/*** @return File*/public function getNormalMapTextureFile(){return $this->normalMapTextureFile;}/*** @param File|null $metallicMapTextureFile*/public function setMetallicMapTextureFile(File $metallicMapTextureFile = null){$this->metallicMapTextureFile = $metallicMapTextureFile;// VERY IMPORTANT:// It is required that at least one field changes if you are using Doctrine,// otherwise the event listeners won't be called and the file is lostif ($metallicMapTextureFile) {// if 'updatedAt' is not defined in your entity, use another property$this->updatedAt = new \DateTime('now');}}/*** @return File*/public function getMetallicMapTextureFile(){return $this->metallicMapTextureFile;}/*** @param File|null $heightMapTextureFile*/public function setHeightMapTextureFile(File $heightMapTextureFile = null){$this->heightMapTextureFile = $heightMapTextureFile;// VERY IMPORTANT:// It is required that at least one field changes if you are using Doctrine,// otherwise the event listeners won't be called and the file is lostif ($heightMapTextureFile) {// if 'updatedAt' is not defined in your entity, use another property$this->updatedAt = new \DateTime('now');}}/*** @return File*/public function getHeightMapTextureFile(){return $this->heightMapTextureFile;}/*** @param File|null $occlusionMapTextureFile*/public function setOcclusionMapTextureFile(File $occlusionMapTextureFile = null){$this->occlusionMapTextureFile = $occlusionMapTextureFile;// VERY IMPORTANT:// It is required that at least one field changes if you are using Doctrine,// otherwise the event listeners won't be called and the file is lostif ($occlusionMapTextureFile) {// if 'updatedAt' is not defined in your entity, use another property$this->updatedAt = new \DateTime('now');}}/*** @return File*/public function getOcclusionMapTextureFile(){return $this->occlusionMapTextureFile;}/*** @return null|\DateTime*/public function getUpdatedAt(): ?\DateTime{return $this->updatedAt;}/*** @param \DateTime|null $updatedAt* @return $this*/public function setUpdatedAt(?\DateTime $updatedAt): static{$this->updatedAt = $updatedAt;return $this;}public function getPfosten(): ?Pfosten{return $this->pfosten;}public function setPfosten(?Pfosten $pfosten): self{$this->pfosten = $pfosten;return $this;}public function getAccessories(): ?Pfosten{return $this->accessories;}public function setAccessories(?Pfosten $accessories): self{$this->accessories = $accessories;return $this;}public function getZaunelement(): ?Zaunelement{return $this->zaunelement;}public function setZaunelement(?Zaunelement $zaunelement): self{$this->zaunelement = $zaunelement;return $this;}public function getTerrasse(): ?Terrasse{return $this->terrasse;}public function setTerrasse(?Terrasse $terrasse): self{$this->terrasse = $terrasse;return $this;}/*** @return string*/public function __toString(): string{return (string)$this->title;}public function getTextureTilingX(): ?float{return $this->textureTilingX;}public function setTextureTilingX(?float $textureTilingX): self{$this->textureTilingX = $textureTilingX;return $this;}public function getTextureTilingY(): ?float{return $this->textureTilingY;}public function setTextureTilingY(?float $textureTilingY): self{$this->textureTilingY = $textureTilingY;return $this;}public function getSmoothness(): ?float{return $this->smoothness;}public function setSmoothness(?float $smoothness): self{$this->smoothness = $smoothness;return $this;}public function getHeightMapIntensity(): ?float{return $this->heightMapIntensity;}public function setHeightMapIntensity(?float $heightMapIntensity): self{$this->heightMapIntensity = $heightMapIntensity;return $this;}public function getNormalMapIntensity(): ?float{return $this->normalMapIntensity;}public function setNormalMapIntensity(?float $normalMapIntensity): self{$this->normalMapIntensity = $normalMapIntensity;return $this;}public function getOcclusionMapIntensity(): ?float{return $this->occlusionMapIntensity;}public function setOcclusionMapIntensity(?float $occlusionMapIntensity): self{$this->occlusionMapIntensity = $occlusionMapIntensity;return $this;}public function getMetallicMapIntensity(): ?float{return $this->metallicMapIntensity;}public function setMetallicMapIntensity(?float $metallicMapIntensity): self{$this->metallicMapIntensity = $metallicMapIntensity;return $this;}}