start_date = new \DateTime(); $this->leave_date = new \DateTime(); } public function getId(): ?int { return $this->id; } public function setId(int $id): self { $this->id = $id; return $this; } public function getFirst_Name(): ?string { return $this->first_name; } public function setFirst_Name(string $first_name): self { $this->first_name = $first_name; return $this; } public function getSecond_Name(): ?string { return $this->second_name; } public function setSecond_Name(string $second_name): self { $this->second_name = $second_name; return $this; } public function getJob_Title(): ?string { return $this->job_title; } public function setJob_Title(string $job_title): self { $this->job_title = $job_title; return $this; } public function getAvatar(): ?string { return $this->avatar; } public function setAvatar(string $avatar): self { $this->avatar = $avatar; return $this; } public function getEmail_Avatar(): ?string { return $this->email_avatar; } public function setEmail_Avatar(string $email_avatar): self { $this->email_avatar = $email_avatar; return $this; } public function getContract_Employment(): ?string { return $this->contract_employment; } public function setContract_Employment(string $contract_employment): self { $this->contract_employment = $contract_employment; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getPersonal_Telephone(): ?string { return $this->personal_telephone; } public function setPersonal_Telephone(string $personal_telephone): self { $this->personal_telephone = $personal_telephone; return $this; } public function getPersonal_Email(): ?string { return $this->personal_email; } public function setPersonal_Email(string $personal_email): self { $this->personal_email = $personal_email; return $this; } public function getPersonal_Address_Street1(): ?string { return $this->personal_address_street1; } public function setPersonal_Address_Street1(string $personal_address_street1): self { $this->personal_address_street1 = $personal_address_street1; return $this; } public function getPersonal_Address_Street2(): ?string { return $this->personal_address_street2; } public function setPersonal_Address_Street2(string $personal_address_street2): self { $this->personal_address_street2 = $personal_address_street2; return $this; } public function getPersonal_Address_City(): ?string { return $this->personal_address_city; } public function setPersonal_Address_City(string $personal_address_city): self { $this->personal_address_city = $personal_address_city; return $this; } public function getPersonal_Address_Postcode(): ?string { return $this->personal_address_postcode; } public function setPersonal_Address_Postcode(string $personal_address_postcode): self { $this->personal_address_postcode = $personal_address_postcode; return $this; } public function getEmergency_Contact_1_Name(): ?string { return $this->emergency_contact_1_name; } public function setEmergency_Contact_1_Name(string $emergency_contact_1_name): self { $this->emergency_contact_1_name = $emergency_contact_1_name; return $this; } public function getEmergency_Contact_1_Telephone(): ?string { return $this->emergency_contact_1_telephone; } public function setEmergency_Contact_1_Telephone(string $emergency_contact_1_telephone): self { $this->emergency_contact_1_telephone = $emergency_contact_1_telephone; return $this; } public function getEmergency_Contact_2_Name(): ?string { return $this->emergency_contact_2_name; } public function setEmergency_Contact_2_Name(string $emergency_contact_2_name): self { $this->emergency_contact_2_name = $emergency_contact_2_name; return $this; } public function getEmergency_Contact_2_Telephone(): ?string { return $this->emergency_contact_2_telephone; } public function setEmergency_Contact_2_Telephone(string $emergency_contact_2_telephone): self { $this->emergency_contact_2_telephone = $emergency_contact_2_telephone; return $this; } public function getWork_Mobile(): ?string { return $this->work_mobile; } public function setWork_Mobile(string $work_mobile): self { $this->work_mobile = $work_mobile; return $this; } public function getWork_Telephone(): ?string { return $this->work_telephone; } public function setWork_Telephone(string $work_telephone): self { $this->work_telephone = $work_telephone; return $this; } public function getWork_Telephone_Extension(): ?string { return $this->work_telephone_extension; } public function setWork_Telephone_Extension(string $work_telephone_extension): self { $this->work_telephone_extension = $work_telephone_extension; return $this; } public function getWork_Telephone_Alt1(): ?string { return $this->work_telephone_alt1; } public function setWork_Telephone_Alt1(string $work_telephone_alt1): self { $this->work_telephone_alt1 = $work_telephone_alt1; return $this; } public function getWork_Telephone_Alt2(): ?string { return $this->work_telephone_alt2; } public function setWork_Telephone_Alt2(string $work_telephone_alt2): self { $this->work_telephone_alt2 = $work_telephone_alt2; return $this; } public function getAccount_Disabled(): ?bool { return $this->account_disabled; } public function setAccount_Disabled(bool $account_disabled): self { $this->account_disabled = $account_disabled; return $this; } public function getHoliday_Allowance(): ?int { return $this->holiday_allowance; } public function setHoliday_Allowance(int $holiday_allowance): self { $this->holiday_allowance = $holiday_allowance; return $this; } public function getHoliday_Refresh_Month(): ?int { return $this->holiday_refresh_month; } public function setHoliday_Refresh_Month(int $holiday_refresh_month): self { $this->holiday_refresh_month = $holiday_refresh_month; return $this; } public function getStart_Date(): ?\DateTime { return $this->start_date; } public function setStart_Date(?\DateTime $start_date): self { $this->start_date = $start_date; return $this; } public function getLeave_Date(): ?\DateTime { return $this->leave_date; } public function setLeave_Date(?\DateTime $leave_date): self { $this->leave_date = $leave_date; return $this; } /** * The public representation of the user (e.g. a username, an email address, etc.) * * @see UserInterface */ public function getUserIdentifier(): string { return (string) $this->email; } /** * @see UserInterface */ public function getRoles(): array { $roles = $this->roles; // guarantee every user at least has ROLE_USER $roles[] = 'ROLE_USER'; //set values as keys $___roles = []; foreach ($roles as $key => $value) { $___roles[$value] = $value; } return $___roles; } public function setRoles(array $roles): self { $this->roles = $roles; return $this; } /** * @see PasswordAuthenticatedUserInterface */ public function getPassword(): string { return $this->password; } public function setPassword(string $password): self { $this->password = $password; return $this; } public function isAdmin(): bool { $roles = $this->getRoles(); if (isset($roles['ROLE_ADMIN']) || isset($roles['ROLE_SUPERADMIN'])) { return true; } return false; } /** * @see UserInterface */ public function eraseCredentials(): void { // If you store any temporary, sensitive data on the user, clear it here // $this->plainPassword = null; } public function isDeleted(): ?bool { return $this->account_disabled; } public function isDisabled(): ?bool { return $this->account_disabled; } public function isExpired(): ?bool { return $this->account_disabled; } /** * @see PasswordHasherAwareInterface */ public function getPasswordHasherName(): ?string { if ($this->isAdmin()) { return 'harsh'; } return null; // use the default hasher } }