src/Entity/Messaging/RedirectLink.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Messaging;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\App\Messaging\RedirectLinkRepository")
  7.  */
  8. class RedirectLink
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     protected $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      * @Assert\NotBlank
  19.      */
  20.     protected $label;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      * @Assert\NotBlank
  24.      */
  25.     protected $url;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity="App\Entity\Messaging\Subject", inversedBy="redirectLinks")
  28.      * @ORM\JoinColumn(nullable=false)
  29.      * @Assert\Url
  30.      */
  31.     protected $subject;
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getLabel(): ?string
  37.     {
  38.         return $this->label;
  39.     }
  40.     public function setLabel(string $label): self
  41.     {
  42.         $this->label $label;
  43.         return $this;
  44.     }
  45.     public function getUrl(): ?string
  46.     {
  47.         return $this->url;
  48.     }
  49.     public function setUrl(string $url): self
  50.     {
  51.         $this->url $url;
  52.         return $this;
  53.     }
  54.     public function getSubject(): ?Subject
  55.     {
  56.         return $this->subject;
  57.     }
  58.     public function setSubject(?Subject $subject): self
  59.     {
  60.         $this->subject $subject;
  61.         return $this;
  62.     }
  63. }