<?php/* * This file is part of the kProjet project. * * (c) Kodiom <info@kodiom.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */namespace App\Entity;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;use ApiPlatform\Core\Annotation\ApiResource;/** * InfosLegales * * @ApiResource(attributes={"filters"={"infos_legales.search"}}) * @ORM\Table() * @ORM\Entity(repositoryClass="App\Repository\InfosLegalesRepository") */class InfosLegales{ /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var text * * @ORM\Column(name="titre", type="text") * * @Assert\NotBlank() */ private $titre; /** * @var text * * @ORM\Column(name="message", type="text") * * @Assert\NotBlank() */ private $message; /** * @var string * * @ORM\Column(type="string", length=75) * * @Assert\NotBlank() */ private $type; public function __toString() { return ($this->getTitre()) ? $this->getTitre() : ''; } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Get titre * * @return text */ public function getTitre() { return $this->titre; } /** * Set titre * * @param text $titre * * @return InfosLegales */ public function setTitre($titre) { $this->titre = $titre; return $this; } /** * Get message * * @return text */ public function getMessage() { return $this->message; } /** * Set message * * @param text $message * * @return InfosLegales */ public function setMessage($message) { $this->message = $message; return $this; } /** * Get type * * @return string */ public function getType() { return $this->type; } /** * Set type * * @param string $type * * @return InfosLegales */ public function setType($type) { $this->type = $type; return $this; }}