<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Translatable\Translatable;
/**
* @ORM\Entity(repositoryClass="App\Repository\TransmissionRepository")
*
* @ORM\Table(name="vehicule_transmission")
*/
class Transmission implements Translatable, LabelInterface, \Stringable
{
/**
* @ORM\Id
*
* @ORM\Column(type="bigint")
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string")
*
* @Gedmo\Translatable
*/
protected $name;
/**
* Locale.
*
* @Gedmo\Locale
*/
protected $locale;
public function __construct(/**
* @ORM\Column(type="string")
*/
protected $slug)
{
$this->name = ucfirst((string) $this->slug);
}
public function __toString(): string
{
return (string) $this->getName();
}
/**
* Get id.
*/
public function getId()
{
return $this->id;
}
/**
* Get Slug.
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set Slug.
*/
public function setSlug($slug): void
{
$this->slug = $slug;
}
/**
* Get name.
*/
public function getName()
{
return $this->name;
}
/**
* Set name.
*/
public function setName($name): void
{
$this->name = $name;
}
public function setTranslatableLocale($locale): void
{
$this->locale = $locale;
}
}