src/Entity/Team.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Application\Sonata\MediaBundle\Entity\Media;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use ZendDiagnostics\Result\Collection;
  6. /**
  7.  * @ORM\Entity
  8.  * @ORM\Entity(repositoryClass="App\Repository\TeamRepository")
  9.  */
  10. class Team implements EntityInterface
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(name="id", type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     public $id;
  20.     /**
  21.      * @var string
  22.      * @ORM\Column(name="email", type="string", length=255, unique=true, nullable=true)
  23.      */
  24.     private $email;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\Application\Sonata\MediaBundle\Entity\Media", cascade={"persist"}, fetch="LAZY")
  27.      */
  28.     private $photo;
  29.     /**
  30.      * @var string
  31.      * @ORM\Column(name="first_name", type="string",length=255, nullable=true)
  32.      */
  33.     private $firstName;
  34.     /**
  35.      * @var string
  36.      * @ORM\Column(name="last_name", type="string", length=255, nullable=true)
  37.      */
  38.     private $lastName;
  39.     /**
  40.      * @var string
  41.      * @ORM\Column(name="role", type="string", length=255, nullable=true)
  42.      */
  43.     private $role;
  44.     /**
  45.      * @var string
  46.      * @ORM\Column(name="department", type="string", length=255, nullable=true)
  47.      */
  48.     private $department;
  49.     /**
  50.      * @var string
  51.      * @ORM\Column(name="phone", type="string", length=255, nullable=true)
  52.      */
  53.     private $phone;
  54.     /**
  55.      * @var string
  56.      * @ORM\Column(name="phone_2", type="string", length=255, nullable=true)
  57.      */
  58.     private $phone2;
  59.     /**
  60.      * @var string
  61.      * @ORM\Column(name="twitter_account", type="string", length=255, nullable=true)
  62.      */
  63.     private $twitterAccount;
  64.     /**
  65.      * @var string
  66.      * @ORM\Column(name="linkedin_account", type="string", length=255, nullable=true)
  67.      */
  68.     private $linkedinAccount;
  69.     /**
  70.      * @var string
  71.      * @ORM\Column(name="biography", type="string", length=200, nullable=true)
  72.      */
  73.     private $biography;
  74.     /**
  75.      * @var string
  76.      * @ORM\Column(name="address", type="string", length=255, nullable=true)
  77.      */
  78.     private $address;
  79.     /**
  80.      * Constructor
  81.      */
  82.     public function __construct()
  83.     {
  84.     }
  85.     /**
  86.      * @return string
  87.      */
  88.     public function getDepartment(): ?string
  89.     {
  90.         return $this->department;
  91.     }
  92.     /**
  93.      * @param string $department
  94.      */
  95.     public function setDepartment(string $department null): void
  96.     {
  97.         $this->department $department;
  98.     }
  99.     /**
  100.      * @return string
  101.      */
  102.     public function getPhone(): ?string
  103.     {
  104.         return $this->phone;
  105.     }
  106.     /**
  107.      * @param string $phone
  108.      */
  109.     public function setPhone(string $phone null): void
  110.     {
  111.         $this->phone $phone;
  112.     }
  113.     /**
  114.      * @return string
  115.      */
  116.     public function getTwitterAccount(): ?string
  117.     {
  118.         return $this->twitterAccount;
  119.     }
  120.     /**
  121.      * @param string|null $twitterAccount
  122.      */
  123.     public function setTwitterAccount(?string $twitterAccount)
  124.     {
  125.         $this->twitterAccount $twitterAccount;
  126.     }
  127.     /**
  128.      * @return string
  129.      */
  130.     public function getLinkedinAccount(): ?string
  131.     {
  132.         return $this->linkedinAccount;
  133.     }
  134.     /**
  135.      * @param string|null $linkedinAccount
  136.      */
  137.     public function setLinkedinAccount(?string $linkedinAccount)
  138.     {
  139.         $this->linkedinAccount $linkedinAccount;
  140.     }
  141.     public function getId()
  142.     {
  143.         return $this->id;
  144.     }
  145.     public function __toString()
  146.     {
  147.         return (string)$this->getEmail();
  148.     }
  149.     public function getEmail(): ?string
  150.     {
  151.         return $this->email;
  152.     }
  153.     /**
  154.      * @param string $email
  155.      */
  156.     public function setEmail(string $email null)
  157.     {
  158.         $this->email $email;
  159.     }
  160.     public function toString(): string
  161.     {
  162.         return "{id=" $this->id "}";
  163.     }
  164.     /**
  165.      * @return string
  166.      */
  167.     public function getFirstName(): ?string
  168.     {
  169.         return $this->firstName;
  170.     }
  171.     /**
  172.      * @param string $firstName
  173.      */
  174.     public function setFirstName(string $firstName null)
  175.     {
  176.         $this->firstName $firstName;
  177.     }
  178.     /**
  179.      * @return string
  180.      */
  181.     public function getLastName(): ?string
  182.     {
  183.         return $this->lastName;
  184.     }
  185.     /**
  186.      * @param string $lastName
  187.      */
  188.     public function setLastName(string $lastName null)
  189.     {
  190.         $this->lastName $lastName;
  191.     }
  192.     /**
  193.      * @return string
  194.      */
  195.     public function getRole(): ?string
  196.     {
  197.         return $this->role;
  198.     }
  199.     /**
  200.      * @param string $role
  201.      */
  202.     public function setRole(string $role null)
  203.     {
  204.         $this->role $role;
  205.     }
  206.     public function uploadPhoto()
  207.     {
  208.     }
  209.     /**
  210.      * Get photo
  211.      *
  212.      * @return Media
  213.      */
  214.     public function getPhoto(): ?Media
  215.     {
  216.         return $this->photo;
  217.     }
  218.     /**
  219.      * Set photo
  220.      *
  221.      * @param Media $photo
  222.      *
  223.      * @return Team
  224.      */
  225.     public function setPhoto(Media $photo null)
  226.     {
  227.         $this->photo $photo;
  228.         return $this;
  229.     }
  230.     /**
  231.      * @return string
  232.      */
  233.     public function getBiography(): ?string
  234.     {
  235.         return $this->biography;
  236.     }
  237.     /**
  238.      * @param string $biography
  239.      * @return Team
  240.      */
  241.     public function setBiography(?string $biography): ?Team
  242.     {
  243.         $this->biography $biography;
  244.         return $this;
  245.     }
  246.     /**
  247.      * @return string
  248.      */
  249.     public function getPhone2(): ?string
  250.     {
  251.         return $this->phone2;
  252.     }
  253.     /**
  254.      * @param string $phone2
  255.      */
  256.     public function setPhone2(string $phone2): void
  257.     {
  258.         $this->phone2 $phone2;
  259.     }
  260.     /**
  261.      * @return string
  262.      */
  263.     public function getAddress(): ?string
  264.     {
  265.         return $this->address;
  266.     }
  267.     /**
  268.      * @param string $address
  269.      */
  270.     public function setAddress(string $address): void
  271.     {
  272.         $this->address $address;
  273.     }
  274. }