summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4457ca5)
Add getRoles method
Set uses
// src/Rapsys/AirBundle/Entity/User.php
namespace Rapsys\AirBundle\Entity;
// src/Rapsys/AirBundle/Entity/User.php
namespace Rapsys\AirBundle\Entity;
-class User extends \Rapsys\UserBundle\Entity\User {
+use Rapsys\AirBundle\Entity\Application;
+use Rapsys\AirBundle\Entity\Group;
+use Rapsys\AirBundle\Entity\Vote;
+use Rapsys\UserBundle\Entity\User as BaseUser;
+
+class User extends BaseUser {
+ /**
+ * @var string
+ */
+ protected $phone;
+
/**
* @var \Doctrine\Common\Collections\Collection
*/
/**
* @var \Doctrine\Common\Collections\Collection
*/
+ /**
+ * Set phone
+ *
+ * @param string $phone
+ *
+ * @return User
+ */
+ public function setPhone($phone) {
+ $this->phone = $phone;
+
+ return $this;
+ }
+
+ /**
+ * Get phone
+ *
+ * @return string
+ */
+ public function getPhone() {
+ return $this->phone;
+ }
+
- public function addVote(\Rapsys\AirBundle\Entity\Vote $vote) {
+ public function addVote(Vote $vote) {
$this->votes[] = $vote;
return $this;
$this->votes[] = $vote;
return $this;
*
* @param \Rapsys\AirBundle\Entity\Vote $vote
*/
*
* @param \Rapsys\AirBundle\Entity\Vote $vote
*/
- public function removeVote(\Rapsys\AirBundle\Entity\Vote $vote) {
+ public function removeVote(Vote $vote) {
$this->votes->removeElement($vote);
}
$this->votes->removeElement($vote);
}
- public function addApplication(\Rapsys\AirBundle\Entity\Application $application) {
+ public function addApplication(Application $application) {
$this->applications[] = $application;
return $this;
$this->applications[] = $application;
return $this;
*
* @param \Rapsys\AirBundle\Entity\Application $application
*/
*
* @param \Rapsys\AirBundle\Entity\Application $application
*/
- public function removeApplication(\Rapsys\AirBundle\Entity\Application $application) {
+ public function removeApplication(Application $application) {
$this->applications->removeElement($application);
}
$this->applications->removeElement($application);
}
public function getApplications() {
return $this->applications;
}
public function getApplications() {
return $this->applications;
}
+
+ /**
+ * Get roles
+ *
+ * @return array
+ */
+ public function getRoles() {
+ //Return roles array
+ //XXX: [ ROLE_USER, ROLE_XXX, ... ]
+ return parent::getRoles();
+ }