src/Entity/PageMenuLink.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\CommonTrait;
  4. use App\Repository\PageMenuLinkRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8.  * @ORM\Entity(repositoryClass=PageMenuLinkRepository::class)
  9.  * @ORM\Table(name="app_page_menu_link")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  * @UniqueEntity({"uuid"})
  12.  */
  13. class PageMenuLink
  14. {
  15.     use CommonTrait;
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     private $name;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $route;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=PageMenu::class, inversedBy="links")
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private $menu;
  29.     public function getName(): ?string
  30.     {
  31.         return $this->name;
  32.     }
  33.     public function setName(string $name): self
  34.     {
  35.         $this->name $name;
  36.         return $this;
  37.     }
  38.     public function getRoute(): ?string
  39.     {
  40.         return $this->route;
  41.     }
  42.     public function setRoute(string $route): self
  43.     {
  44.         $this->route $route;
  45.         return $this;
  46.     }
  47.     public function getMenu(): ?PageMenu
  48.     {
  49.         return $this->menu;
  50.     }
  51.     public function setMenu(?PageMenu $menu): self
  52.     {
  53.         $this->menu $menu;
  54.         return $this;
  55.     }
  56. }