class Role extends AbstractEntity implements RoleInterface (View source)

Roles are persisted version of string Symfony's roles.

Constants

ROLE_DEFAULT

ROLE_SUPERADMIN

ROLE_BACKEND_USER

Properties

protected $id from AbstractEntity

Methods

int
getId()

No description

setId(int $id)

No description

string
getName()

No description

string
getRole()

[email protected]}

$this
setName(string $name)

No description

static string
cleanName(string $name)

No description

ArrayCollection
getGroups()

No description

addGroup(Group $group)

No description

removeGroup(Group $group)

No description

string
getClassName()

Get a classified version of current role name.

boolean
required()

No description

__construct(string $name = null)

Create a new Role with its string representation.

Details

int getId()

Return Value

int

AbstractEntity setId(int $id)

Parameters

int $id

Return Value

AbstractEntity

string getName()

Return Value

string

string getRole()

[email protected]}

Return Value

string

$this setName(string $name)

Parameters

string $name

Return Value

$this

static string cleanName(string $name)

Parameters

string $name

Return Value

string $name

ArrayCollection getGroups()

Return Value

ArrayCollection

Group addGroup(Group $group)

Parameters

Group $group

Return Value

Group

Group removeGroup(Group $group)

Parameters

Group $group

Return Value

Group

string getClassName()

Get a classified version of current role name.

It replace underscores by dashes and lowercase.

Return Value

string

boolean required()

Return Value

boolean

__construct(string $name = null)

Create a new Role with its string representation.

Parameters

string $name Role name