src/Entity/Structures.php
<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\StructuresRepository")
*/
class Structures extends OSEntity
{
public function __construct(){
parent::__construct();
$this->projects = new ArrayCollection();
}
/**
* @var string
*
* @ORM\Column(name="position", type="integer", nullable=true)
*/
private $position;
/**
* @var string
*
* @ORM\Column(name="abbreviation", type="string", length=255,nullable=true)
*/
private $abbreviation;
/**
* @ORM\OneToOne(targetEntity="App\Entity\Picture", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\JoinColumn(nullable=true)
*/
private $logo;
/**
* @var string
*
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $director;
/**
* @var string
*
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $directorTitle;
/**
* @var string
*
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $directorFacebook;
/**
* @var string
*
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $directorTwitter;
/**
* @ORM\OneToOne(targetEntity="App\Entity\Picture", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\JoinColumn(nullable=true)
*/
private $directorPicture;
/**
* @var string
*
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $address;
/**
* @var string
*
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $phone;
/**
* @var string
*
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $email;
/**
* @var string
*
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $website;
/**
* @var string
*
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $map;
/**
* @ORM\ManyToOne(targetEntity=StructuresCategories::class, inversedBy="structures", fetch="EAGER")
* @ORM\JoinColumn(nullable=true)
*/
private $category;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $town;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $longitude;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $latitude;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isOnTop;
public function getName(): ?string
{
return $this->getTitle();
}
public function setName(?string $name): self
{
return $this->setTitle();
}
public function getPosition(): ?int
{
return $this->position;
}
public function setPosition(?int $position): self
{
$this->position = $position;
return $this;
}
public function getAbbreviation(): ?string
{
return $this->abbreviation;
}
public function setAbbreviation(?string $abbreviation): self
{
$this->abbreviation = $abbreviation;
return $this;
}
public function getDirector(): ?string
{
return $this->director;
}
public function setDirector(?string $director): self
{
$this->director = $director;
return $this;
}
public function getDirectorPicture(): ?Picture
{
return $this->directorPicture;
}
public function setDirectorPicture(?Picture $directorPicture): self
{
if($directorPicture->getTarget()){
$this->directorPicture = $directorPicture;
$this->directorPicture->setDir('upload/images/structures');
$this->directorPicture->setThumbnailDir('upload/thumbnails/structures');
}
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(?string $address): self
{
$this->address = $address;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getWebsite(): ?string
{
return $this->website;
}
public function setWebsite(?string $website): self
{
$this->website = $website;
return $this;
}
public function getMap(): ?string
{
return $this->map;
}
public function setMap(?string $map): self
{
$this->map = $map;
return $this;
}
public function getLogo(): ?Picture
{
return $this->logo;
}
public function setLogo(?Picture $logo): self
{
if($logo->getTarget()){
$this->logo = $logo;
$this->logo->setDir('upload/images/structures');
$this->logo->setThumbnailDir('upload/thumbnails/structures');
}
return $this;
}
public function getCategory(): ?StructuresCategories
{
return $this->category;
}
public function setCategory(?StructuresCategories $category): self
{
$this->category = $category;
return $this;
}
public function getTown(): ?string
{
return $this->town;
}
public function setTown(?string $town): self
{
$this->town = $town;
return $this;
}
public function getLongitude(): ?string
{
return $this->longitude;
}
public function setLongitude(?string $longitude): self
{
$this->longitude = $longitude;
return $this;
}
public function getLatitude(): ?string
{
return $this->latitude;
}
public function setLatitude(?string $latitude): self
{
$this->latitude = $latitude;
return $this;
}
public function getIsOnTop(): ?bool
{
return $this->isOnTop;
}
public function setIsOnTop(?bool $isOnTop): self
{
$this->isOnTop = $isOnTop;
return $this;
}
public function getDirectorTitle(): ?string
{
return $this->directorTitle;
}
public function setDirectorTitle(?string $directorTitle): self
{
$this->directorTitle = $directorTitle;
return $this;
}
public function getDirectorFacebook(): ?string
{
return $this->directorFacebook;
}
public function setDirectorFacebook(?string $directorFacebook): self
{
$this->directorFacebook = $directorFacebook;
return $this;
}
public function getDirectorTwitter(): ?string
{
return $this->directorTwitter;
}
public function setDirectorTwitter(?string $directorTwitter): self
{
$this->directorTwitter = $directorTwitter;
return $this;
}
public function isIsOnTop(): ?bool
{
return $this->isOnTop;
}
}