<?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;/** * PresentationSite * * @ApiResource( * attributes={ * "filters"={ * "presentation_site.order", * "presentation_site.boolean", * "presentation_site.search" * }, * "pagination_items_per_page"=1 * } * ) * * @ORM\Table() * @ORM\Entity(repositoryClass="App\Repository\PresentationSiteRepository") */class PresentationSite{ /** * @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 bool * * @ORM\Column(name="actif", type="boolean") */ private $actif; /** * @var string * * @ORM\Column(type="string", length=75) * * @Assert\NotBlank() */ private $type; /** * Constructor of PresentationSite Entity */ public function __construct() { $this->actif = true; } 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 PresentationSite */ 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 PresentationSite */ public function setMessage($message) { $this->message = $message; return $this; } /** * Get actif * * @return boolean */ public function getActif() { return $this->actif; } /** * Set actif * * @param bool $actif * * @return PresentationSite */ public function setActif($actif) { $this->actif = $actif; return $this; } /** * Get type * * @return string */ public function getType() { return $this->type; } /** * Set type * * @param string $type * * @return PresentationSite */ public function setType($type) { $this->type = $type; return $this; }}