src/ProductBundle/Entity/Translation/CollectionTranslation.php line 15

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