src/Entity/Locales.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\ActiveTrait;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7. * Locales.
  8. *
  9. * @Gedmo\Loggable
  10. */
  11. #[ORM\Entity(repositoryClass: \App\Repository\LocalesRepository::class)]
  12. #[ORM\Table(name: 'locales')]
  13. class Locales
  14. {
  15. use ActiveTrait;
  16. #[ORM\Column(name: 'id', type: 'integer')]
  17. #[ORM\Id]
  18. #[ORM\GeneratedValue(strategy: 'AUTO')]
  19. private int $id;
  20. /**
  21. * @Gedmo\Versioned
  22. */
  23. #[ORM\Column(name: 'locale', type: 'string', length: 6, unique: true)]
  24. private ?string $locale = null;
  25. /**
  26. * @Gedmo\Versioned
  27. */
  28. #[ORM\Column(name: 'language', type: 'string', length: 255)]
  29. private ?string $language = null;
  30. /**
  31. * Get id.
  32. */
  33. public function getId(): int
  34. {
  35. return $this->id;
  36. }
  37. /**
  38. * Set locale.
  39. *
  40. * @param string $locale
  41. */
  42. public function setLocale($locale): self
  43. {
  44. $this->locale = $locale;
  45. return $this;
  46. }
  47. /**
  48. * Get locale.
  49. */
  50. public function getLocale(): ?string
  51. {
  52. return $this->locale;
  53. }
  54. /**
  55. * Set language.
  56. *
  57. * @param string $language
  58. */
  59. public function setLanguage($language): self
  60. {
  61. $this->language = $language;
  62. return $this;
  63. }
  64. /**
  65. * Get language.
  66. */
  67. public function getLanguage(): ?string
  68. {
  69. return $this->language;
  70. }
  71. }