src/Entity/FilmProjectMember.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FilmProjectMemberRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassFilmProjectMemberRepository::class)]
  6. class FilmProjectMember
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length255nullabletrue)]
  13.     private $name;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private $role;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $address;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private $state;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private $postcode;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private $organisation;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private $telephone;
  26.     #[ORM\Column(type'string'length255nullabletrue)]
  27.     private $email;
  28.     #[ORM\Column(type'string'length255nullabletrue)]
  29.     private $gender;
  30.     #[ORM\Column(type'boolean'nullabletrue)]
  31.     private $isLingualDiverse;
  32.     #[ORM\Column(type'boolean'nullabletrue)]
  33.     private $isIslanderOrigin;
  34.     #[ORM\ManyToOne(targetEntityFilmProject::class, inversedBy'filmProjectMembers')]
  35.     private $filmProject;
  36.     #[ORM\Column(type'text'nullabletrue)]
  37.     private $biography;
  38.     #[ORM\Column(type'string'length255nullabletrue)]
  39.     private $website;
  40.     #[ORM\Column(type'string'length255nullabletrue)]
  41.     private $salesforceId;
  42.     #[ORM\Column(type'string'length255nullabletrue)]
  43.     private $accountSalesforceId;
  44.     #[ORM\Column(type'boolean'nullabletrue)]
  45.     private $isActive;
  46.     #[ORM\Column(type'boolean'nullabletrue)]
  47.     private $isSent;
  48.     #[ORM\OneToOne(inversedBy'filmProjectAdmin'targetEntityFilmProject::class, cascade: ['persist''remove'])]
  49.     private $adminFilmProject;
  50.     #[ORM\OneToOne(inversedBy'filmProjectProducer'targetEntityFilmProject::class, cascade: ['persist''remove'])]
  51.     private $producerFilmProject;
  52.     #[ORM\OneToOne(inversedBy'filmProjectDirector'targetEntityFilmProject::class, cascade: ['persist''remove'])]
  53.     private $directorFilmProject;
  54.     #[ORM\Column(length255nullabletrue)]
  55.     private ?string $lastName null;
  56.     #[ORM\Column(nullabletrue)]
  57.     private ?int $wordpressId null;
  58.     #[ORM\Column(length255nullabletrue)]
  59.     private ?string $city null;
  60.     public function getId(): ?int
  61.     {
  62.         return $this->id;
  63.     }
  64.     public function getName(): ?string
  65.     {
  66.         return $this->name;
  67.     }
  68.     public function setName(string $name): self
  69.     {
  70.         $this->name $name;
  71.         return $this;
  72.     }
  73.     public function getRole(): ?string
  74.     {
  75.         return $this->role;
  76.     }
  77.     public function setRole(string $role): self
  78.     {
  79.         $this->role $role;
  80.         return $this;
  81.     }
  82.     public function getAddress(): ?string
  83.     {
  84.         return $this->address;
  85.     }
  86.     public function setAddress(string $address): self
  87.     {
  88.         $this->address $address;
  89.         return $this;
  90.     }
  91.     public function getState(): ?string
  92.     {
  93.         return $this->state;
  94.     }
  95.     public function setState(string $state): self
  96.     {
  97.         $this->state $state;
  98.         return $this;
  99.     }
  100.     public function getPostcode(): ?string
  101.     {
  102.         return $this->postcode;
  103.     }
  104.     public function setPostcode(string $postcode): self
  105.     {
  106.         $this->postcode $postcode;
  107.         return $this;
  108.     }
  109.     public function getOrganisation(): ?string
  110.     {
  111.         return $this->organisation;
  112.     }
  113.     public function setOrganisation(string $organisation): self
  114.     {
  115.         $this->organisation $organisation;
  116.         return $this;
  117.     }
  118.     public function getTelephone(): ?string
  119.     {
  120.         return $this->telephone;
  121.     }
  122.     public function setTelephone(string $telephone): self
  123.     {
  124.         $this->telephone $telephone;
  125.         return $this;
  126.     }
  127.     public function getEmail(): ?string
  128.     {
  129.         return $this->email;
  130.     }
  131.     public function setEmail(string $email): self
  132.     {
  133.         $this->email $email;
  134.         return $this;
  135.     }
  136.     public function getGender(): ?string
  137.     {
  138.         return $this->gender;
  139.     }
  140.     public function setGender(string $gender): self
  141.     {
  142.         $this->gender $gender;
  143.         return $this;
  144.     }
  145.     public function isIsLingualDiverse(): ?bool
  146.     {
  147.         return $this->isLingualDiverse;
  148.     }
  149.     public function setIsLingualDiverse(?bool $isLingualDiverse): self
  150.     {
  151.         $this->isLingualDiverse $isLingualDiverse;
  152.         return $this;
  153.     }
  154.     public function isIsIslanderOrigin(): ?bool
  155.     {
  156.         return $this->isIslanderOrigin;
  157.     }
  158.     public function setIsIslanderOrigin(?bool $isIslanderOrigin): self
  159.     {
  160.         $this->isIslanderOrigin $isIslanderOrigin;
  161.         return $this;
  162.     }
  163.     public function getFilmProject(): ?FilmProject
  164.     {
  165.         return $this->filmProject;
  166.     }
  167.     public function setFilmProject(?FilmProject $filmProject): self
  168.     {
  169.         $this->filmProject $filmProject;
  170.         return $this;
  171.     }
  172.     public function toString()
  173.     {
  174.         $string 'Film Project Member';
  175.         if ($this->name) {
  176.         $string $this->name ' ' $this->lastName;
  177.         }
  178.         return $string;
  179.     }
  180.     public function __toString()
  181.     {
  182.         return $this->toString();
  183.     }
  184.     public function getBiography(): ?string
  185.     {
  186.         return $this->biography;
  187.     }
  188.     public function setBiography(?string $biography): self
  189.     {
  190.         $this->biography $biography;
  191.         return $this;
  192.     }
  193.     public function getWebsite(): ?string
  194.     {
  195.         return $this->website;
  196.     }
  197.     public function setWebsite(?string $website): self
  198.     {
  199.         $this->website $website;
  200.         return $this;
  201.     }
  202.     public function getSalesforceId(): ?string
  203.     {
  204.         return $this->salesforceId;
  205.     }
  206.     public function setSalesforceId(?string $salesforceId): self
  207.     {
  208.         $this->salesforceId $salesforceId;
  209.         return $this;
  210.     }
  211.     public function getAccountSalesforceId(): ?string
  212.     {
  213.         return $this->accountSalesforceId;
  214.     }
  215.     public function setAccountSalesforceId(?string $accountSalesforceId): self
  216.     {
  217.         $this->accountSalesforceId $accountSalesforceId;
  218.         return $this;
  219.     }
  220.     public function isIsActive(): ?bool
  221.     {
  222.         return $this->isActive;
  223.     }
  224.     public function setIsActive(?bool $isActive): self
  225.     {
  226.         $this->isActive $isActive;
  227.         return $this;
  228.     }
  229.     public function approveInvitation(): self
  230.     {
  231.         $this->isActive true;
  232.         return $this;
  233.     }
  234.     public function declineInvitation(): self
  235.     {
  236.         $this->isActive false;
  237.         return $this;
  238.     }
  239.     public function isIsSent(): ?bool
  240.     {
  241.         return $this->isSent;
  242.     }
  243.     public function setIsSent(?bool $isSent): self
  244.     {
  245.         $this->isSent $isSent;
  246.         return $this;
  247.     }
  248.     public function approveSentEmail(): self
  249.     {
  250.         $this->setIsSent(true);
  251.         return $this;
  252.     }
  253.     public function getAdminFilmProject(): ?FilmProject
  254.     {
  255.         return $this->adminFilmProject;
  256.     }
  257.     public function setAdminFilmProject(?FilmProject $filmProject): self
  258.     {
  259.         $this->adminFilmProject $filmProject;
  260.         return $this;
  261.     }
  262.     public function getProducerFilmProject(): ?FilmProject
  263.     {
  264.         return $this->producerFilmProject;
  265.     }
  266.     public function setProducerFilmProject(?FilmProject $filmProject): self
  267.     {
  268.         $this->producerFilmProject $filmProject;
  269.         return $this;
  270.     }
  271.     public function getDirectorFilmProject(): ?FilmProject
  272.     {
  273.         return $this->directorFilmProject;
  274.     }
  275.     public function setDirectorFilmProject(?FilmProject $filmProject): self
  276.     {
  277.         $this->directorFilmProject $filmProject;
  278.         return $this;
  279.     }
  280.     public function getMainProject(): ?FilmProject
  281.     {
  282.         $project null;
  283.         if ($this->role) {
  284.             switch($this->role) {
  285.                 case 'Administrator':
  286.                     $project $this->adminFilmProject;
  287.                     break;
  288.                 case 'Director':
  289.                     $project $this->directorFilmProject;
  290.                     if (empty($project)) {
  291.                         $project$this->filmProject;
  292.                     }
  293.                     break;
  294.                 case 'Producer':
  295.                     $project $this->producerFilmProject;
  296.                     if (empty($project)) {
  297.                         $project$this->filmProject;
  298.                     }
  299.                     break;
  300.                 default:
  301.                     $project $this->filmProject;
  302.                     break;
  303.             }
  304.         }
  305.         return $project;
  306.     }
  307.     public function getLastName(): ?string
  308.     {
  309.         return $this->lastName;
  310.     }
  311.     public function setLastName(?string $lastName): self
  312.     {
  313.         $this->lastName $lastName;
  314.         return $this;
  315.     }
  316.     public function getFullName(): ?string
  317.     {
  318.         if ($this->lastName) {
  319.             return $this->name ' ' $this->lastName;
  320.         }
  321.         return $this->name;
  322.     }
  323.     public function getWordpressId(): ?int
  324.     {
  325.         return $this->wordpressId;
  326.     }
  327.     public function setWordpressId(?int $wordpressId): self
  328.     {
  329.         $this->wordpressId $wordpressId;
  330.         return $this;
  331.     }
  332.     public function getCity(): ?string
  333.     {
  334.         return $this->city;
  335.     }
  336.     public function setCity(?string $city): self
  337.     {
  338.         $this->city $city;
  339.         return $this;
  340.     }
  341. }