src/Profile/Entity/Register.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Profile\Entity;
  3. use Symfony\Component\Validator\Constraints\Email;
  4. use Symfony\Component\Validator\Constraints\NotBlank;
  5. use Symfony\Component\Validator\Mapping\ClassMetadata;
  6. class Register
  7. {
  8.   protected $country;
  9.   protected $gender;
  10.   protected $vat;
  11.   protected $company;
  12.   protected $firstname;
  13.   protected $lastname;
  14.   protected $email;
  15.   protected $password;
  16.   protected $profileType;
  17.   protected $title;
  18.   protected $phone;
  19.   protected $preferredLanguage;
  20.   protected $accept_privacy;
  21.   protected $accept_termsofuse;
  22.   protected $accept_oflegalage;
  23.   public function getCountry(): ?string
  24.   {
  25.     return $this->country;
  26.   }
  27.   public function setCountry(string $country)
  28.   {
  29.     $this->country $country;
  30.   }
  31.   public function getPreferredLanguage(): ?string
  32.   {
  33.     return $this->preferredLanguage;
  34.   }
  35.   public function setPreferredLanguage(string $preferredLanguage)
  36.   {
  37.     $this->preferredLanguage $preferredLanguage;
  38.   }
  39.   public function getGender(): ?string
  40.   {
  41.     return $this->gender;
  42.   }
  43.   public function setProfileType(?string $profileType)
  44.   {
  45.     $this->profileType $profileType;
  46.   }
  47.   public function getProfileType(): ?string
  48.   {
  49.     return $this->profileType;
  50.   }
  51.   public function setTitle(?string $title)
  52.   {
  53.     $this->title $title;
  54.   }
  55.   public function getTitle(): ?string
  56.   {
  57.     return $this->title;
  58.   }
  59.   public function setPhone(?string $phone)
  60.   {
  61.     $this->phone $phone;
  62.   }
  63.   public function getPhone(): ?string
  64.   {
  65.     return $this->phone;
  66.   }
  67.   public function setVat(string $vat)
  68.   {
  69.     $this->vat $vat;
  70.   }
  71.   public function getVat(): ?string
  72.   {
  73.     return $this->vat;
  74.   }
  75.   public function setCompany(string $company)
  76.   {
  77.     $this->company $company;
  78.   }
  79.   public function getCompany(): ?string
  80.   {
  81.     return $this->company;
  82.   }
  83.   public function setGender(string $gender)
  84.   {
  85.     $this->gender $gender;
  86.   }
  87.   public function getFirstname(): ?string
  88.   {
  89.     return $this->firstname;
  90.   }
  91.   public function setFirstname(string $firstname)
  92.   {
  93.     $this->firstname $firstname;
  94.   }
  95.   public function getLastname(): ?string
  96.   {
  97.     return $this->lastname;
  98.   }
  99.   public function setLastname(string $lastname)
  100.   {
  101.     $this->lastname $lastname;
  102.   }
  103.   public function getEmail(): ?string
  104.   {
  105.     return $this->email;
  106.   }
  107.   public function setEmail(string $email)
  108.   {
  109.     $this->email $email;
  110.   }
  111.   public function getPassword(): ?string
  112.   {
  113.     return $this->password;
  114.   }
  115.   public function setPassword(string $password)
  116.   {
  117.     $this->password $password;
  118.   }
  119.   public function getAcceptPrivacy(): ?string
  120.   {
  121.     return $this->accept_privacy;
  122.   }
  123.   public function setAcceptPrivacy(string $accept_privacy)
  124.   {
  125.     $this->accept_privacy $accept_privacy;
  126.   }
  127.   public function getAcceptTermsofuse(): ?string
  128.   {
  129.     return $this->accept_termsofuse;
  130.   }
  131.   public function setAcceptTermsofuse(string $accept_termsofuse)
  132.   {
  133.     $this->accept_termsofuse $accept_termsofuse;
  134.   }
  135.   public function getAcceptOfLegalAge(): ?string
  136.   {
  137.     return $this->accept_oflegalage;
  138.   }
  139.   public function setAcceptOfLegalAge(string $accept_oflegalage)
  140.   {
  141.     $this->accept_oflegalage $accept_oflegalage;
  142.   }
  143.   public static function loadValidatorMetadata(ClassMetadata $metadata): void
  144.   {
  145.     $metadata->addPropertyConstraint('email', new NotBlank());
  146.     $metadata->addPropertyConstraint('email', new Email());
  147.     $metadata->addPropertyConstraint('password', new NotBlank());
  148.   }
  149. }