src/Entity/model/Contact.php line 15

Open in your IDE?
  1. <?php
  2. /**
  3.  * User: remmel
  4.  * Date: 3/10/16
  5.  * Time: 1:57 PM
  6.  */
  7. namespace App\Entity\model;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use EWZ\Bundle\RecaptchaBundle\Validator\Constraints as Recaptcha;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. class Contact {
  12.     /**
  13.      * @Assert\Email
  14.      * @Assert\NotNull
  15.      */
  16.     private string $email;
  17.     /**
  18.      * @Assert\NotNull
  19.      */
  20.     private string $name;
  21.     /**
  22.      * @Assert\NotNull
  23.      */
  24.     private string $subject;
  25.     /**
  26.      * @ORM\Column(name="comment", type="text", length=255)
  27.      */
  28.     private string $message;
  29.     /**
  30.      * @Recaptcha\IsTrue
  31.      */
  32.     private bool $recaptcha;
  33.     public function getEmail(): string {
  34.         return $this->email;
  35.     }
  36.     public function setEmail(string $email) {
  37.         $this->email $email;
  38.     }
  39.     public function getName(): string {
  40.         return $this->name;
  41.     }
  42.     public function setName(string $name) {
  43.         $this->name $name;
  44.     }
  45.     public function getMessage(): string {
  46.         return $this->message;
  47.     }
  48.     public function setMessage(string $message) {
  49.         $this->message $message;
  50.     }
  51.     public function getSubject(): string {
  52.         return $this->subject;
  53.     }
  54.     public function setSubject(string $subject) {
  55.         $this->subject $subject;
  56.     }
  57.     public function isRecaptcha(): ?bool {
  58.         return $this->recaptcha;
  59.     }
  60.     public function setRecaptcha(bool $recaptcha): void {
  61.         $this->recaptcha $recaptcha;
  62.     }
  63. }