src/Entity/Shortcut.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Media\Media;
  4. use App\Entity\Program\Program;
  5. use App\Repository\ShortcutRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ShortcutRepository::class)
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class Shortcut extends BaseEntity
  12. {
  13.     /**
  14.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="shortcuts")
  15.      */
  16.     private $user;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=Media::class, inversedBy="shortcuts")
  19.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  20.      */
  21.     private $media;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Program::class, inversedBy="shortcuts")
  24.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  25.      */
  26.     private $program;
  27.     public function getUser(): ?User
  28.     {
  29.         return $this->user;
  30.     }
  31.     public function setUser(?User $user): self
  32.     {
  33.         $this->user $user;
  34.         return $this;
  35.     }
  36.     public function getMedia(): ?Media
  37.     {
  38.         return $this->media;
  39.     }
  40.     public function setMedia(?Media $media): self
  41.     {
  42.         $this->media $media;
  43.         return $this;
  44.     }
  45.     public function getProgram(): ?Program
  46.     {
  47.         return $this->program;
  48.     }
  49.     public function setProgram(?Program $program): self
  50.     {
  51.         $this->program $program;
  52.         return $this;
  53.     }
  54. }