src/Entity/System/Menu.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity(repositoryClass="App\Repository\System\MenuRepository")
  6. *
  7. * @ORM\Table(name="menu")
  8. */
  9. class Menu
  10. {
  11. public const HEADER_ID = 1;
  12. public const FOOTER_ID = 2;
  13. public const ROOT_NAME = 'RAÍZ';
  14. /**
  15. * @var int
  16. *
  17. * @ORM\Id
  18. *
  19. * @ORM\GeneratedValue(strategy="AUTO")
  20. *
  21. * @ORM\Column(type="integer")
  22. */
  23. private $id;
  24. /**
  25. * @var string
  26. *
  27. * @ORM\Column(type="string", length=30)
  28. */
  29. private $name;
  30. /**
  31. * @return int
  32. */
  33. public function getId(): int
  34. {
  35. return $this->id;
  36. }
  37. /**
  38. * @param int $id
  39. *
  40. * @return Menu
  41. */
  42. public function setId(int $id): self
  43. {
  44. $this->id = $id;
  45. return $this;
  46. }
  47. /**
  48. * @return string
  49. */
  50. public function getName(): string
  51. {
  52. return $this->name;
  53. }
  54. /**
  55. * @param string $name
  56. *
  57. * @return Menu
  58. */
  59. public function setName(string $name): self
  60. {
  61. $this->name = $name;
  62. return $this;
  63. }
  64. }