use Doctrine\Common\Collections\ArrayCollection;
-use Rapsys\AirBundle\Entity\Application;
-use Rapsys\AirBundle\Entity\Group;
-use Rapsys\AirBundle\Entity\Link;
-use Rapsys\AirBundle\Entity\Snippet;
use Rapsys\UserBundle\Entity\User as BaseUser;
class User extends BaseUser {
/**
* @var string
*/
- protected $donate;
+ protected $city;
/**
* @var string
*/
- protected $link;
+ protected $phone;
+
+ /**
+ * @var Country
+ */
+ protected $country;
/**
* @var string
*/
- protected $phone;
+ protected $pseudonym;
/**
* @var string
*/
- protected $profile;
+ protected $zipcode;
/**
* @var ArrayCollection
//Call parent constructor
parent::__construct($mail);
+ //Set defaults
+ $this->city = null;
+ $this->country = null;
+ $this->phone = null;
+ $this->pseudonym = null;
+ $this->zipcode = null;
+
//Set collections
$this->applications = new ArrayCollection();
$this->dances = new ArrayCollection();
}
/**
- * Set donate
+ * Set country
*
- * @param string $donate
+ * @param Country $country
*
- * @return User
+ * @return Snippet
*/
- public function setDonate(?string $donate): User {
- $this->donate = $donate;
+ public function setCountry(Country $country) {
+ $this->country = $country;
return $this;
}
/**
- * Get donate
+ * Get country
*
- * @return string
+ * @return Country
*/
- public function getDonate(): ?string {
- return $this->donate;
+ public function getCountry() {
+ return $this->country;
}
/**
- * Set link
+ * Set city
*
- * @param string $link
+ * @param string $city
*
* @return User
*/
- public function setLink(?string $link): User {
- $this->link = $link;
+ public function setCity(?string $city): User {
+ $this->city = $city;
return $this;
}
/**
- * Get link
+ * Get city
*
* @return string
*/
- public function getLink(): ?string {
- return $this->link;
+ public function getCity(): ?string {
+ return $this->city;
}
/**
}
/**
- * Set profile
+ * Set pseudonym
*
- * @param string $profile
+ * @param string $pseudonym
*
* @return User
*/
- public function setProfile(string $profile): User {
- $this->profile = $profile;
+ public function setPseudonym(?string $pseudonym): User {
+ $this->pseudonym = $pseudonym;
return $this;
}
/**
- * Get profile
+ * Get pseudonym
*
* @return string
*/
- public function getProfile(): ?string {
- return $this->profile;
+ public function getPseudonym(): ?string {
+ return $this->pseudonym;
}
/**
- * Add application
+ * Set zipcode
*
- * @param Application $application
+ * @param string $zipcode
*
* @return User
*/
- public function addApplication(Application $application): User {
- $this->applications[] = $application;
+ public function setZipcode(?string $zipcode): User {
+ $this->zipcode = $zipcode;
return $this;
}
/**
- * Remove application
- *
- * @param Application $application
- */
- public function removeApplication(Application $application): bool {
- return $this->applications->removeElement($application);
- }
-
- /**
- * Get applications
+ * Get zipcode
*
- * @return ArrayCollection
+ * @return string
*/
- public function getApplications(): ArrayCollection {
- return $this->applications;
+ public function getZipcode(): ?string {
+ return $this->zipcode;
}
/**
- * Add snippet
+ * Add application
*
- * @param Snippet $snippet
+ * @param Application $application
*
* @return User
*/
- public function addSnippet(Snippet $snippet): User {
- $this->snippets[] = $snippet;
+ public function addApplication(Application $application): User {
+ $this->applications[] = $application;
return $this;
}
/**
- * Remove snippet
+ * Remove application
*
- * @param Snippet $snippet
+ * @param Application $application
*/
- public function removeSnippet(Snippet $snippet): bool {
- return $this->snippets->removeElement($snippet);
+ public function removeApplication(Application $application): bool {
+ return $this->applications->removeElement($application);
}
/**
- * Get snippets
+ * Get applications
*
* @return ArrayCollection
*/
- public function getSnippets(): ArrayCollection {
- return $this->snippets;
+ public function getApplications(): ArrayCollection {
+ return $this->applications;
}
/**
return $this->locations;
}
+ /**
+ * Add snippet
+ *
+ * @param Snippet $snippet
+ *
+ * @return User
+ */
+ public function addSnippet(Snippet $snippet): User {
+ $this->snippets[] = $snippet;
+
+ return $this;
+ }
+
+ /**
+ * Remove snippet
+ *
+ * @param Snippet $snippet
+ */
+ public function removeSnippet(Snippet $snippet): bool {
+ return $this->snippets->removeElement($snippet);
+ }
+
+ /**
+ * Get snippets
+ *
+ * @return ArrayCollection
+ */
+ public function getSnippets(): ArrayCollection {
+ return $this->snippets;
+ }
+
/**
* Add subscriber
*