저자: Thibault Duplessis (thibault.duplessis@gmail.com)
저자: Johannes M. Schmitt (schmittjoh@gmail.com)
상속: implements FOS\UserBundle\Model\UserInterface, implements FOS\UserBundle\Model\GroupableInterface
예제 #1
0
 /**
  * isGranted
  *
  * @param string $grantedRole
  * @param User $user
  * @return bool
  */
 public function isGranted($grantedRole, User $user)
 {
     $grantedRole = new Role($grantedRole);
     if (count($user->getRoles())) {
         foreach ($user->getRoles() as $role) {
             $roles = $this->roleHierarchy->getReachableRoles(array(new Role($role)));
             if (in_array($grantedRole, $roles)) {
                 return true;
             }
         }
     }
     return false;
 }
예제 #2
0
파일: User.php 프로젝트: NeonXP/NightQuest
 public function __construct()
 {
     parent::__construct();
     $this->requests = new ArrayCollection();
     $this->experience = 0;
     $this->newOauth = false;
 }
예제 #3
0
 public function __construct()
 {
     parent::__construct();
     // your own logic
     $this->commandes = new \Doctrine\Common\Collections\ArrayCollection();
     $this->adresses = new \Doctrine\Common\Collections\ArrayCollection();
 }
예제 #4
0
 public function __construct()
 {
     parent::__construct();
     // your own logic
     $this->usuario_adopciones = new ArrayCollection();
     $this->usuario_archivos = new ArrayCollection();
 }
예제 #5
0
 public function __construct()
 {
     parent::__construct();
     $this->postsCreated = new ArrayCollection();
     $this->tagsCreated = new ArrayCollection();
     // your own logic
 }
예제 #6
0
파일: User.php 프로젝트: Marquand/support
 public function __construct()
 {
     parent::__construct();
     $this->folders = new ArrayCollection();
     $this->events = new ArrayCollection();
     $this->enabled = 0;
 }
예제 #7
0
 public function __construct($class)
 {
     parent::__construct($class);
     //$now = new \Datetime();
     //$this->created = $now;
     //$this->updated = $now;
 }
예제 #8
0
파일: Users.php 프로젝트: nicks78/MyFirst
 public function __construct()
 {
     parent::__construct();
     $this->address = new \Doctrine\Common\Collections\ArrayCollection();
     $this->orders = new \Doctrine\Common\Collections\ArrayCollection();
     $this->userImg = new \Doctrine\Common\Collections\ArrayCollection();
 }
예제 #9
0
파일: User.php 프로젝트: bhdm/bankrotOld
 public function __construct()
 {
     parent::__construct();
     $this->forumQuestions = new ArrayCollection();
     $this->forumAnswers = new ArrayCollection();
     $this->lots = new ArrayCollection();
 }
예제 #10
0
 public function __construct()
 {
     parent::__construct();
     $this->files = new ArrayCollection();
     $this->directories = new ArrayCollection();
     $this->playlists = new ArrayCollection();
 }
예제 #11
0
 public function __construct()
 {
     parent::__construct();
     $this->addRole('ROLE_USER');
     $this->autoPassword = false;
     $this->autoUsername = false;
 }
예제 #12
0
 public function __construct()
 {
     $this->artigos = new ArrayCollection();
     $this->mensagens = new ArrayCollection();
     $this->topicos = new ArrayCollection();
     parent::__construct();
 }
예제 #13
0
 public function setUsername($username)
 {
     parent::setUsername($username);
     // El email se configura automáticamente.
     $this->setEmail($username . '@uco.es');
     return $this;
 }
예제 #14
0
 public function __construct()
 {
     parent::__construct();
     $this->products = new ArrayCollection();
     $this->orders = new ArrayCollection();
     $this->address = new ArrayCollection();
 }
예제 #15
0
파일: User.php 프로젝트: m2fd/crud-contacts
 /**
  * User constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->isActive = true;
     // may not be needed, see section on salt below
     // $this->salt = md5(uniqid(null, true));
 }
예제 #16
0
파일: User.php 프로젝트: JavaTrain/train
 public function __construct()
 {
     parent::__construct();
     $this->groups = new \Doctrine\Common\Collections\ArrayCollection();
     $this->courses = new \Doctrine\Common\Collections\ArrayCollection();
     $this->payments = new \Doctrine\Common\Collections\ArrayCollection();
 }
예제 #17
0
 public function __construct()
 {
     parent::__construct();
     // your own logic
     $this->passwordExpireAt = new \DateTime('next month');
     $this->roles = new ArrayCollection();
 }
예제 #18
0
파일: Blogger.php 프로젝트: hejoseph/blog
 public function __construct()
 {
     parent::__construct();
     // your own logic
     $this->blog = new ArrayCollection();
     $this->comments = new ArrayCollection();
 }
예제 #19
0
 /**
  * Set email
  *
  * @return string
  */
 public function setEmail($email)
 {
     $email = is_null($email) ? '' : $email;
     parent::setEmail($email);
     $this->setUsername($email);
     return $this;
 }
예제 #20
0
파일: User.php 프로젝트: adashbob/pgiweb
 public function __construct()
 {
     parent::__construct();
     if (empty($this->roles)) {
         $this->roles[] = 'ROLE_USER';
     }
 }
예제 #21
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->articles = new ArrayCollection();
     $this->ratings = new ArrayCollection();
     $this->answers = new ArrayCollection();
 }
예제 #22
0
파일: User.php 프로젝트: jreziga/portfolio
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->enabled = true;
     $this->username = microtime();
     $this->username_canonical = $this->username;
 }
예제 #23
0
 /**
  * *******************************************************
  * Constructor
  * *******************************************************
  */
 public function __construct()
 {
     parent::__construct();
     $this->setSubscribe(true);
     $this->invoices = new ArrayCollection();
     $this->reviews = new ArrayCollection();
 }
예제 #24
0
파일: User.php 프로젝트: itrascastro/IRB2
 public function __construct()
 {
     parent::__construct();
     $this->modulos = new ArrayCollection();
     $this->createdAt = new \DateTime();
     $this->updatedAt = $this->createdAt;
 }
예제 #25
0
파일: User.php 프로젝트: houximing/sportfun
 public function __construct()
 {
     parent::__construct();
     // your own logic
     $this->stadiums = new ArrayCollection();
     $this->bookings = new ArrayCollection();
 }
예제 #26
0
 public function __construct()
 {
     parent::__construct();
     $this->setCreatedAt(new \DateTime());
     $this->setUpdatedAt(new \DateTime());
     $this->characters = new ArrayCollection();
 }
예제 #27
0
 /**
  * User constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->authored_tickets = new ArrayCollection();
     $this->assigned_tickets = new ArrayCollection();
     $this->workers = new ArrayCollection();
 }
예제 #28
0
 public function __construct()
 {
     parent::__construct();
     if (in_array('ROLE_API', $this->getRoles())) {
         $this->setApiKey(ApiKeyGenerator::generate());
     }
 }
예제 #29
0
 public function __construct()
 {
     parent::__construct();
     $this->infos = new \Doctrine\Common\Collections\ArrayCollection();
     $this->articles = new \Doctrine\Common\Collections\ArrayCollection();
     $this->comments = new \Doctrine\Common\Collections\ArrayCollection();
 }
예제 #30
0
 public function __construct()
 {
     parent::__construct();
     $this->{$commentaires} = new ArrayCollection();
     $this->{$commandesTraites} = new ArrayCollection();
     $this->{$commandesEnvoyes} = new ArrayCollection();
 }