src/Entity/InfosLegales.php line 25

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the kProjet project.
  4.  *
  5.  * (c) Kodiom <info@kodiom.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace App\Entity;
  11. use Doctrine\ORM\Mapping as ORM;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. use ApiPlatform\Core\Annotation\ApiResource;
  14. /**
  15.  * InfosLegales
  16.  *
  17.  * @ApiResource(attributes={"filters"={"infos_legales.search"}})
  18.  * @ORM\Table()
  19.  * @ORM\Entity(repositoryClass="App\Repository\InfosLegalesRepository")
  20.  */
  21. class InfosLegales
  22. {
  23.     /**
  24.      * @var int
  25.      *
  26.      * @ORM\Column(name="id", type="integer")
  27.      * @ORM\Id
  28.      * @ORM\GeneratedValue(strategy="AUTO")
  29.      */
  30.     private $id;
  31.     /**
  32.      * @var text
  33.      *
  34.      * @ORM\Column(name="titre", type="text")
  35.      *
  36.      * @Assert\NotBlank()
  37.      */
  38.     private $titre;
  39.     /**
  40.      * @var text
  41.      *
  42.      * @ORM\Column(name="message", type="text")
  43.      *
  44.      * @Assert\NotBlank()
  45.      */
  46.     private $message;
  47.     /**
  48.      * @var string
  49.      *
  50.      * @ORM\Column(type="string", length=75)
  51.      *
  52.      * @Assert\NotBlank()
  53.      */
  54.     private $type;
  55.     public function __toString()
  56.     {
  57.         return ($this->getTitre()) ? $this->getTitre() : '';
  58.     }
  59.     /**
  60.      * Get id
  61.      *
  62.      * @return integer
  63.      */
  64.     public function getId()
  65.     {
  66.         return $this->id;
  67.     }
  68.     /**
  69.      * Get titre
  70.      *
  71.      * @return text
  72.      */
  73.     public function getTitre()
  74.     {
  75.         return $this->titre;
  76.     }
  77.     /**
  78.      * Set titre
  79.      *
  80.      * @param text $titre
  81.      *
  82.      * @return InfosLegales
  83.      */
  84.     public function setTitre($titre)
  85.     {
  86.         $this->titre $titre;
  87.         return $this;
  88.     }
  89.     /**
  90.      * Get message
  91.      *
  92.      * @return text
  93.      */
  94.     public function getMessage()
  95.     {
  96.         return $this->message;
  97.     }
  98.     /**
  99.      * Set message
  100.      *
  101.      * @param text $message
  102.      *
  103.      * @return InfosLegales
  104.      */
  105.     public function setMessage($message)
  106.     {
  107.         $this->message $message;
  108.         return $this;
  109.     }
  110.     /**
  111.      * Get type
  112.      *
  113.      * @return string
  114.      */
  115.     public function getType()
  116.     {
  117.         return $this->type;
  118.     }
  119.     /**
  120.      * Set type
  121.      *
  122.      * @param string $type
  123.      *
  124.      * @return InfosLegales
  125.      */
  126.     public function setType($type)
  127.     {
  128.         $this->type $type;
  129.         return $this;
  130.     }
  131. }