groupCenters = new ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set username * * @param string $name * @return Agent */ public function setUsername($name) { $this->username = $name; return $this; } public function __toString() { return $this->getUsername(); } public function eraseCredentials() { } /** * * @return string */ public function getPassword() { return $this->password; } public function getRoles() { return 'ROLE_USER'; } public function getSalt() { return $this->salt; } public function getUsername() { return $this->username; } function setPassword($password) { $this->password = $password; return $this; } function setSalt($salt) { $this->salt = $salt; return $this; } /** * {@inheritdoc} * * @return boolean */ public function isAccountNonExpired() { return false; } /** * {@inheritdoc} * */ public function isAccountNonLocked() { return $this->locked; } /** * {@inheritdoc} * * @return boolean */ public function isCredentialsNonExpired() { return true; } /** * {@inheritdoc} * * @return boolean */ public function isEnabled() { return $this->enabled; } /** * * @return GroupCenter[] */ public function getGroupCenters() { return $this->groupCenters; } /** * * @param \Chill\MainBundle\Entity\GroupCenter $groupCenter * @return \Chill\MainBundle\Entity\User */ public function addGroupCenter(GroupCenter $groupCenter) { $this->groupCenters->add($groupCenter); return $this; } }