src/Entity/Contact.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. //use App\Repository\ConsultationRepository;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. class Contact {
  6.     /**
  7.      * @var string|null
  8.      * @Assert\NotBlank()
  9.      * @Assert\Length(min=2, max=50)
  10.      */
  11.     private $fullName;
  12. //    /**
  13. //     * @var string|null
  14. //     * @Assert\NotBlank()
  15. //     * @Assert\Length(min=2, max=50)
  16. //     */
  17. //    private $phone;
  18.     /**
  19.      * @Assert\NotBlank()
  20.      */
  21.     private $subject;
  22.     /**
  23.      * @Assert\Email()
  24.      * @Assert\NotBlank()
  25.      */
  26.     private $email;
  27.     
  28.     /**
  29.      * @Assert\NotBlank()
  30.      * @Assert\Length(min=10)
  31.      */
  32.     private $message;
  33.     public function getId(): ?int {
  34.         return $this->id;
  35.     }
  36.     public function getEmail(): ?string {
  37.         return $this->email;
  38.     }
  39.     public function setEmail(string $email): self {
  40.         $this->email = $email;
  41.         return $this;
  42.     }
  43.   
  44.     public function getMessage(): ?string {
  45.         return $this->message;
  46.     }
  47.     public function setMessage(string $message): self {
  48.         $this->message = $message;
  49.         return $this;
  50.     }
  51.     
  52.     public function getFullName(): ?string {
  53.         return $this->fullName;
  54.     }
  55.     public function setFullName(?string $fullName): void {
  56.         $this->fullName = $fullName;
  57.     }
  58. //      public function getFullName(): string {
  59. //        return $this->getFirstName() .' '. $this->getLastName();
  60. //    }
  61.     public function getSubject() {
  62.         return $this->subject;
  63.     }
  64.     public function setSubject($subject): void {
  65.         $this->subject = $subject;
  66.     }
  67.     /**
  68.      * @return string|null
  69.      */
  70.     public function getPhone(): ?string
  71.     {
  72.         return $this->phone;
  73.     }
  74.     /**
  75.      * @param string|null $phone
  76.      */
  77.     public function setPhone(?string $phone): void
  78.     {
  79.         $this->phone = $phone;
  80.     }
  81. }