src/Entity/Contributor.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContributorRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ContributorRepository::class)
  9.  */
  10. class Contributor
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $label1;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $field1;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $label2;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $field2;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $label3;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $field3;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $label4;
  46.     /**
  47.      * @ORM\Column(type="string", length=255, nullable=true)
  48.      */
  49.     private $field4;
  50.     /**
  51.      * @ORM\Column(type="string", length=255, nullable=true)
  52.      */
  53.     private $label5;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $field5;
  58.     /**
  59.      * @ORM\Column(type="string", length=255, nullable=true)
  60.      */
  61.     private $label6;
  62.     /**
  63.      * @ORM\Column(type="string", length=255, nullable=true)
  64.      */
  65.     private $field6;
  66.     /**
  67.      * @ORM\Column(type="string", length=255, nullable=true)
  68.      */
  69.     private $label7;
  70.     /**
  71.      * @ORM\Column(type="string", length=255, nullable=true)
  72.      */
  73.     private $field7;
  74.     /**
  75.      * @ORM\Column(type="string", length=255, nullable=true)
  76.      */
  77.     private $labelTextarea;
  78.     /**
  79.      * @ORM\Column(type="text", nullable=true)
  80.      */
  81.     private $textarea;
  82.     /**
  83.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="contributors")
  84.      */
  85.     private $user;
  86.     /**
  87.      * @ORM\Column(type="string", length=255, nullable=true)
  88.      */
  89.     private $labelMedia;
  90.     /**
  91.      * @ORM\OneToMany(targetEntity=Media::class, mappedBy="contributor", cascade={"remove"})
  92.      */
  93.     private $media;
  94.     /**
  95.      * @ORM\ManyToOne(targetEntity=Instance::class)
  96.      */
  97.     private $instance;
  98.     public function __construct()
  99.     {
  100.         $this->media = new ArrayCollection();
  101.     }
  102.     public function getId(): ?int
  103.     {
  104.         return $this->id;
  105.     }
  106.     public function getLabel1(): ?string
  107.     {
  108.         return $this->label1;
  109.     }
  110.     public function setLabel1(?string $label1): self
  111.     {
  112.         $this->label1 $label1;
  113.         return $this;
  114.     }
  115.     public function getField1(): ?string
  116.     {
  117.         return $this->field1;
  118.     }
  119.     public function setField1(?string $field1): self
  120.     {
  121.         $this->field1 $field1;
  122.         return $this;
  123.     }
  124.     public function getLabel2(): ?string
  125.     {
  126.         return $this->label2;
  127.     }
  128.     public function setLabel2(?string $label2): self
  129.     {
  130.         $this->label2 $label2;
  131.         return $this;
  132.     }
  133.     public function getField2(): ?string
  134.     {
  135.         return $this->field2;
  136.     }
  137.     public function setField2(?string $field2): self
  138.     {
  139.         $this->field2 $field2;
  140.         return $this;
  141.     }
  142.     public function getLabel3(): ?string
  143.     {
  144.         return $this->label3;
  145.     }
  146.     public function setLabel3(?string $label3): self
  147.     {
  148.         $this->label3 $label3;
  149.         return $this;
  150.     }
  151.     public function getField3(): ?string
  152.     {
  153.         return $this->field3;
  154.     }
  155.     public function setField3(?string $field3): self
  156.     {
  157.         $this->field3 $field3;
  158.         return $this;
  159.     }
  160.     public function getLabel4(): ?string
  161.     {
  162.         return $this->label4;
  163.     }
  164.     public function setLabel4(?string $label4): self
  165.     {
  166.         $this->label4 $label4;
  167.         return $this;
  168.     }
  169.     public function getField4(): ?string
  170.     {
  171.         return $this->field4;
  172.     }
  173.     public function setField4(?string $field4): self
  174.     {
  175.         $this->field4 $field4;
  176.         return $this;
  177.     }
  178.     public function getLabel5(): ?string
  179.     {
  180.         return $this->label5;
  181.     }
  182.     public function setLabel5(?string $label5): self
  183.     {
  184.         $this->label5 $label5;
  185.         return $this;
  186.     }
  187.     public function getField5(): ?string
  188.     {
  189.         return $this->field5;
  190.     }
  191.     public function setField5(?string $field5): self
  192.     {
  193.         $this->field5 $field5;
  194.         return $this;
  195.     }
  196.     public function getLabel6(): ?string
  197.     {
  198.         return $this->label6;
  199.     }
  200.     public function setLabel6(?string $label6): self
  201.     {
  202.         $this->label6 $label6;
  203.         return $this;
  204.     }
  205.     public function getField6(): ?string
  206.     {
  207.         return $this->field6;
  208.     }
  209.     public function setField6(?string $field6): self
  210.     {
  211.         $this->field6 $field6;
  212.         return $this;
  213.     }
  214.     public function getLabel7(): ?string
  215.     {
  216.         return $this->label7;
  217.     }
  218.     public function setLabel7(?string $label7): self
  219.     {
  220.         $this->label7 $label7;
  221.         return $this;
  222.     }
  223.     public function getField7(): ?string
  224.     {
  225.         return $this->field7;
  226.     }
  227.     public function setField7(?string $field7): self
  228.     {
  229.         $this->field7 $field7;
  230.         return $this;
  231.     }
  232.     public function getLabelTextarea(): ?string
  233.     {
  234.         return $this->labelTextarea;
  235.     }
  236.     public function setLabelTextarea(?string $labelTextarea): self
  237.     {
  238.         $this->labelTextarea $labelTextarea;
  239.         return $this;
  240.     }
  241.     public function getTextarea(): ?string
  242.     {
  243.         return $this->textarea;
  244.     }
  245.     public function setTextarea(?string $textarea): self
  246.     {
  247.         $this->textarea $textarea;
  248.         return $this;
  249.     }
  250.     public function getUser(): ?User
  251.     {
  252.         return $this->user;
  253.     }
  254.     public function setUser(?User $user): self
  255.     {
  256.         $this->user $user;
  257.         return $this;
  258.     }
  259.     public function getLabelMedia(): ?string
  260.     {
  261.         return $this->labelMedia;
  262.     }
  263.     public function setLabelMedia(?string $labelMedia): self
  264.     {
  265.         $this->labelMedia $labelMedia;
  266.         return $this;
  267.     }
  268.     /**
  269.      * @return Collection<int, Media>
  270.      */
  271.     public function getMedia(): Collection
  272.     {
  273.         return $this->media;
  274.     }
  275.     public function getFirstMedia()
  276.     {
  277.         return $this->media->first();
  278.     }
  279.     public function addMedia(Media $medium): self
  280.     {
  281.         if (!$this->media->contains($medium)) {
  282.             $this->media[] = $medium;
  283.             $medium->setContributor($this);
  284.         }
  285.         return $this;
  286.     }
  287.     public function removeMedia(Media $medium): self
  288.     {
  289.         if ($this->media->removeElement($medium)) {
  290.             // set the owning side to null (unless already changed)
  291.             if ($medium->getContributor() === $this) {
  292.                 $medium->setContributor(null);
  293.             }
  294.         }
  295.         return $this;
  296.     }
  297.     public function getInstance(): ?Instance
  298.     {
  299.         return $this->instance;
  300.     }
  301.     public function setInstance(?Instance $instance): self
  302.     {
  303.         $this->instance $instance;
  304.         return $this;
  305.     }
  306. }