src/Domain/Entity/Translation/TripCountryTranslation.php line 10

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Domain\Entity\Translation;
  4. use App\Application\Service\SluggerService;
  5. use Locastic\ApiPlatformTranslationBundle\Model\AbstractTranslation;
  6. class TripCountryTranslation extends AbstractTranslation
  7. {
  8.     public ?int $id;
  9.     private ?string $name null;
  10.     /**
  11.      * @return string|null
  12.      */
  13.     public function getName(): ?string
  14.     {
  15.         return $this->name;
  16.     }
  17.     /**
  18.      * @param string|null $name
  19.      */
  20.     public function setName(?string $name): void
  21.     {
  22.         $this->name $name;
  23.     }
  24.     public function getSlug(): string
  25.     {
  26.         return SluggerService::formatSlug($this->getName());
  27.     }
  28. }