name; } /** * @see UserInterface */ public function getRoles(): array { $roles = []; //$roles = $this->roles; // guarantee every user at least has ROLE_USER $roles[] = 'ROLE_USER'; return array_unique($roles); } public function setRoles(array $roles): self { //$this->roles = $roles; return $this; } /** * @see UserInterface */ public function getPassword(): string { return (string) $this->password; } public function setPassword(string $password): self { $this->password = $password; return $this; } /** * @see UserInterface */ public function getSalt() { // not needed when using the "bcrypt" algorithm in security.yaml } /** * @see UserInterface */ public function eraseCredentials() { // If you store any temporary, sensitive data on the user, clear it here // $this->plainPassword = null; } /** * Returns the ID as an string, defined by the element class. * This should have a form like P000014, for a part with ID 14. * @return string The ID as a string; */ public function getIDString(): string { return 'U' . sprintf('%06d', $this->getID()); } /************************************************ * Getters ************************************************/ /** * @return string */ public function getFirstName(): string { return $this->first_name; } /** * @param string $first_name * @return User */ public function setFirstName(string $first_name): User { $this->first_name = $first_name; return $this; } /** * @return string */ public function getLastName(): string { return $this->last_name; } /** * @param string $last_name * @return User */ public function setLastName(string $last_name): User { $this->last_name = $last_name; return $this; } /** * @return string */ public function getDepartment(): string { return $this->department; } /** * @param string $department * @return User */ public function setDepartment(string $department): User { $this->department = $department; return $this; } /** * @return string */ public function getEmail(): string { return $this->email; } /** * @param string $email * @return User */ public function setEmail(string $email): User { $this->email = $email; return $this; } /** * @return string */ public function getLanguage(): string { return $this->language; } /** * @param string $language * @return User */ public function setLanguage(string $language): User { $this->language = $language; return $this; } /** * @return string */ public function getTimezone(): string { return $this->timezone; } /** * @param string $timezone * @return User */ public function setTimezone(string $timezone): User { $this->timezone = $timezone; return $this; } /** * @return string */ public function getTheme(): string { return $this->theme; } /** * @param string $theme * @return User */ public function setTheme(string $theme): User { $this->theme = $theme; return $this; } public function getGroup(): ?Group { return $this->group; } public function setGroup(?Group $group): self { $this->group = $group; return $this; } }