| 1 | <?php |
||
| 18 | class GenreTranslations implements EntityTranslationInterface |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @ORM\Id() |
||
| 22 | * @ORM\GeneratedValue() |
||
| 23 | * @ORM\Column(type="integer") |
||
| 24 | */ |
||
| 25 | private $id; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @ORM\Column(type="string", length=5) |
||
| 29 | * @Groups({"list", "view"}) |
||
| 30 | */ |
||
| 31 | private $locale; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @ORM\ManyToOne(targetEntity="App\Genres\Entity\Genre", inversedBy="translations") |
||
| 35 | * @ORM\JoinColumn(nullable=false) |
||
| 36 | */ |
||
| 37 | private $genre; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @Groups({"list", "view"}) |
||
| 41 | * @ORM\Column(type="string", length=50) |
||
| 42 | */ |
||
| 43 | private $name; |
||
| 44 | |||
| 45 | 2 | public function __construct(Genre $genre, string $locale, string $name) |
|
| 51 | |||
| 52 | public function getId() |
||
| 56 | |||
| 57 | 1 | public function changeName(string $name) |
|
| 61 | |||
| 62 | 21 | public function getName() |
|
| 66 | |||
| 67 | 21 | public function getLocale(): string |
|
| 71 | } |
||
| 72 |