Inheritance: implements FOS\UserBundle\Model\GroupInterface
Example #1
0
 public function __construct($name = "", $roles = array())
 {
     parent::__construct($name, $roles);
     $this->setCreatedAt(new \DateTime());
     $this->setUpdatedAt(new \DateTime());
     $this->setPermissions(array('VIEW', 'EDIT', 'CREATE', 'DELETE'));
 }
Example #2
0
 public function __construct($name, $roles = array())
 {
     parent::__construct($name, $roles);
     $this->users = new \Doctrine\Common\Collections\ArrayCollection();
     $this->consumer = new \Doctrine\Common\Collections\ArrayCollection();
     $this->farmer = new \Doctrine\Common\Collections\ArrayCollection();
 }
Example #3
0
 /**
  * Initializes the Group object.
  *
  * @param int            $id                   the ID
  * @param string         $roleName             only letters and underscore
  * @param string         $publicName           publicly visible name
  * @param bool           $isEssential          true, if the group is essential
  * @param bool           $canBeEmpty           true, if the group may be empty
  * @param string[]       $roles                array of roles granted by this group
  * @param OptionCategory $frontendUserCategory the frontend user category
  * @param OptionCategory $frontendModCategory  the frontend mod category
  * @param OptionCategory $acpCategory          the ACP category
  */
 public function __construct($id, $roleName, $publicName, $isEssential, $canBeEmpty, array $roles, OptionCategory $frontendUserCategory, OptionCategory $frontendModCategory, OptionCategory $acpCategory)
 {
     parent::__construct($publicName, $roles);
     $this->id = $id;
     $this->roleName = strtoupper($roleName);
     $this->isEssential = $isEssential;
     $this->canBeEmpty = $canBeEmpty;
     $this->frontendUserCategory = $frontendUserCategory;
     $this->frontendModCategory = $frontendModCategory;
     $this->acpCategory = $acpCategory;
     $this->users = new ArrayCollection();
 }
Example #4
0
 public function __construct($name, $roles = array())
 {
     parent::__construct($name, $roles = array());
 }
Example #5
0
 public function __construct($name, $roles = array())
 {
     trigger_error(sprintf('%s is deprecated. Extend FOS\\UserBundle\\Model\\Group directly.', __CLASS__), E_USER_DEPRECATED);
     parent::__construct($name, $roles);
 }
Example #6
0
 /**
  * Get roles
  *
  * @return array
  */
 public function getRoles()
 {
     return parent::getRoles();
 }
Example #7
0
 public function __construct()
 {
     $name = $this->name;
     parent::__construct($name, $roles = array());
     $this->users = new ArrayCollection();
 }
Example #8
0
 /**
  * Group constructor.
  *
  * @param $name
  * @param array $roles
  */
 public function __construct($name, array $roles)
 {
     parent::__construct($name, $roles);
 }
Example #9
0
 public function __construct()
 {
     parent::__construct('');
     $this->users = new ArrayCollection();
 }
 /**
  * Consturcts a new instance of Role.
  */
 public function __construct($name = NULL, $roles = array())
 {
     parent::__construct($name, $roles);
     $this->applications = new ArrayCollection();
     $this->users = new ArrayCollection();
 }
Example #11
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct('', array());
     $this->users = new \Doctrine\Common\Collections\ArrayCollection();
 }
Example #12
0
 /**
  * Constructor
  * @param string $name
  * @param array $roles
  */
 public function __construct($name, $roles)
 {
     parent::__construct($name, $roles);
     $this->users = new ArrayCollection();
 }
Example #13
0
 /**
  * __construct
  *
  * @param string $name
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->groupRoles = new ArrayCollection();
 }
Example #14
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->users = new ArrayCollection();
     $this->logins = new ArrayCollection();
 }
Example #15
0
 public function __construct($name, array $roles = [])
 {
     parent::__construct($name, $roles);
     $this->id = Uuid::uuid4();
 }
Example #16
0
 public function __construct()
 {
     parent::__construct('', []);
 }
Example #17
0
 public function __construct($name = '', $roles = [])
 {
     parent::__construct($name, $roles);
 }