<?php namespace App\Entity; use App\Repository\SettingRepository; use App\Traits\DateTrait; use Doctrine\ORM\Mapping as ORM; use JMS\Serializer\Annotation as Serializer; use JMS\Serializer\Annotation\Expose; use JMS\Serializer\Annotation\Groups; use JMS\Serializer\Annotation\SerializedName; /** * @ORM\Entity(repositoryClass=SettingRepository::class) * * @Serializer\ExclusionPolicy ("ALL") */ class Setting { use DateTrait; /** * Identifiant de l'entité * * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") * * @Expose * @Groups ({"setting"}) */ private ?int $id = NULL; /** * Nom du paramètre * * @ORM\Column(type="string", length=255, unique=true) * * @Expose * @Groups ({"setting"}) */ private ?string $name = NULL; /** * Valeur du paramètre * * @ORM\Column(type="text", nullable=true) * * @Expose * @Groups ({"setting"}) */ private ?string $value = NULL; /** * Description du paramètre * * @ORM\Column(type="text") * * @Expose * @Groups ({"setting"}) */ private ?string $description = NULL; /** * Type de champ * * @ORM\Column(type="string", length=30) */ private ?string $fieldType = NULL; /** * Titre du paramètre * * @ORM\Column(type="string", length=128, nullable=true) * * @Expose * @Groups ({"setting"}) */ private ?string $title = NULL; /** * @Serializer\VirtualProperty() * @SerializedName ("title_description") * @Groups ({"setting"}) * * @return array */ public function getNameDescription() { return [$this->title, $this->description]; } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getValue(): ?string { return $this->value; } public function setValue(?string $value): self { $this->value = $value; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): self { $this->description = $description; return $this; } public function getFieldType(): ?string { return $this->fieldType; } public function setFieldType(string $fieldType): self { $this->fieldType = $fieldType; return $this; } public function getTitle(): ?string { return $this->title; } public function setTitle(?string $title): self { $this->title = $title; return $this; } }