Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace RedK\Core\IndexBundle\Entity;
- use Symfony\Component\Security\Core\Role\RoleInterface;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * RedK\IndexBundle\Entity\AccountsRoles
- *
- * @ORM\Table(name="accounts_roles")
- * @ORM\Entity()
- */
- class AccountsRoles implements RoleInterface
- {
- /**
- * @var integer $rolesID
- *
- * @ORM\Column(name="RolesID", type="integer", nullable=false)
- * @ORM\Id()
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $rolesID;
- /**
- * @ORM\Column(name="Name", type="string", length=225)
- */
- private $name;
- /**
- * @ORM\Column(name="Role", type="string", length=25, unique=true)
- */
- private $role;
- /**
- * @ORM\ManyToMany(targetEntity="Accounts", mappedBy="groups")
- */
- private $users;
- public function __construct()
- {
- $this->users = new ArrayCollection();
- }
- /**
- * Get rolesID
- *
- * @return string
- */
- public function getRolesID()
- {
- return $this->rolesID;
- }
- /**
- * Set role
- *
- * @param string $role
- */
- public function setRole($role)
- {
- $this->role = $role;
- }
- /**
- * @see RoleInterface
- */
- public function getRole()
- {
- return $this->role;
- }
- /**
- * Set name
- *
- * @param string $name
- */
- public function setName($name)
- {
- $this->name = $name;
- }
- /**
- * Get name
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Set users
- *
- * @param array $users
- */
- public function setUsers($users)
- {
- $this->users = $users;
- }
- /**
- * Get users
- *
- * @return array
- */
- public function getUsers()
- {
- return $this->users;
- }
- }
Add Comment
Please, Sign In to add comment