UserGroup.php 630 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Tree\Fixture;
  3. /**
  4. * Group entity
  5. *
  6. * @Entity(repositoryClass="Gedmo\Tree\Repository\TreeNodeRepository")
  7. * @Table(name="`user_group`")
  8. */
  9. class UserGroup extends Role {
  10. /**
  11. * @Column(name="name", type="string", length=255)
  12. * @var string
  13. */
  14. private $name;
  15. public function __construct($name) {
  16. $this->setName($name);
  17. }
  18. /**
  19. * @return string
  20. */
  21. public function getRoleId() {
  22. return $this->name;
  23. }
  24. public function getName() {
  25. return $this->name;
  26. }
  27. public function setName($name) {
  28. $this->name = $name;
  29. $this->setRoleId($name);
  30. return $this;
  31. }
  32. }