src/Entity/Translation/CollectionTranslation.php line 12

  1. <?php
  2. namespace App\Entity\Translation;
  3. use App\Entity\Collection;
  4. use Gedmo\Translatable\Entity\MappedSuperclass\AbstractPersonalTranslation;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity]
  7. #[ORM\Table(name'collection_translation')]
  8. #[ORM\UniqueConstraint(name"collection_translation_idx"columns: ['locale','object_id','field'])]
  9. class CollectionTranslation extends AbstractPersonalTranslation
  10. {
  11.     #[ORM\ManyToOne(targetEntityCollection::class, inversedBy'translations')]
  12.     #[ORM\JoinColumn(name"object_id"onDelete'cascade')]
  13.     protected $object;
  14.     public function getObject(): ?\Doctrine\Common\Collections\Collection
  15.     {
  16.         return $this->object;
  17.     }
  18.     public function setObject$object): self
  19.     {
  20.         $this->object $object;
  21.         return $this;
  22.     }
  23. }