<?php


namespace AutoAdmin\Bundle\Content\Entity\Traits;


use AutoAdmin\Bundle\Content\Model\TranslationInterface;
use Symfony\Component\Serializer\Annotation\Groups;

trait TranslatableTrait
{
    #[Groups(['translation'])]
    protected ?TranslationInterface $currentTranslation = null;

    public function getCurrentTranslation(): ?TranslationInterface
    {
        return $this->currentTranslation;
    }

    public function setCurrentTranslation(?TranslationInterface $translation = null): void
    {
        $this->currentTranslation = $translation;
    }
}
