vendor/perfectneeds/locale-bundle/Entity/Language.php line 16

Open in your IDE?
  1. <?php
  2. namespace PN\LocaleBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7. * Language
  8. *
  9. * @UniqueEntity("locale")
  10. * @ORM\Table(name="language")
  11. * @ORM\Entity(repositoryClass="PN\LocaleBundle\Repository\LanguageRepository")
  12. */
  13. class Language implements \PN\LocaleBundle\Model\Language
  14. {
  15. /**
  16. * @ORM\Column(name="id", type="integer")
  17. * @ORM\Id
  18. * @ORM\GeneratedValue(strategy="AUTO")
  19. */
  20. private $id;
  21. /**
  22. * @Assert\NotBlank()
  23. * @ORM\Column(name="locale", type="string", length=5, unique=true)
  24. */
  25. private $locale;
  26. /**
  27. * @Assert\NotBlank()
  28. * @ORM\Column(name="title", type="string", length=45)
  29. */
  30. private $title;
  31. /**
  32. * @ORM\Column(name="flag_asset", type="string", length=45)
  33. */
  34. private $flagAsset;
  35. public function getId()
  36. {
  37. return $this->id;
  38. }
  39. public function setLocale(string $locale): self
  40. {
  41. $this->locale = $locale;
  42. return $this;
  43. }
  44. public function getLocale(): string
  45. {
  46. return $this->locale;
  47. }
  48. public function setTitle(string $title): self
  49. {
  50. $this->title = $title;
  51. return $this;
  52. }
  53. public function getTitle(): string
  54. {
  55. return $this->title;
  56. }
  57. public function setFlagAsset(string $flagAsset): self
  58. {
  59. $this->flagAsset = $flagAsset;
  60. return $this;
  61. }
  62. public function getFlagAsset(): string
  63. {
  64. return $this->flagAsset;
  65. }
  66. }