src/ProductBundle/Entity/Translation/CategoryTranslation.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\ProductBundle\Entity\Translation;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use PN\LocaleBundle\Entity\Language;
  5. use PN\LocaleBundle\Model\EditableTranslation;
  6. use PN\LocaleBundle\Model\TranslationEntity;
  7. ;
  8. /**
  9. * @ORM\Entity
  10. * @ORM\Table(name="category_translations")
  11. */
  12. class CategoryTranslation extends TranslationEntity implements EditableTranslation
  13. {
  14. /**
  15. * @ORM\Column(name="title", type="string", length=100)
  16. */
  17. protected $title;
  18. /**
  19. * @ORM\Id
  20. * @ORM\ManyToOne(targetEntity="App\ProductBundle\Entity\Category", inversedBy="translations")
  21. */
  22. protected $translatable;
  23. /**
  24. * @var Language
  25. * @ORM\Id
  26. * @ORM\ManyToOne(targetEntity="PN\LocaleBundle\Entity\Language")
  27. */
  28. protected $language;
  29. public function setTitle(?string $title): static
  30. {
  31. $this->title = $title;
  32. return $this;
  33. }
  34. public function getTitle(): ?string
  35. {
  36. return $this->title;
  37. }
  38. }