UserGroup.php 682 B

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