Beta version

class Role extends AbstractEntity implements RoleInterface

Roles are persisted version of string Symfony's roles.

Constants

ROLE_DEFAULT

ROLE_SUPERADMIN

ROLE_BACKEND_USER

Methods

int
getId()

Get entity unique identifier.

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

in AbstractEntity at line 51
int getId()

Get entity unique identifier.

Return Value

int

in AbstractEntity at line 60
AbstractEntity setId(int $id)

Parameters

int $id

Return Value

AbstractEntity

at line 59
string getName()

Return Value

string

at line 68
string getRole()

[email protected]}

Return Value

string

at line 78
$this setName(string $name)

Parameters

string $name

Return Value

$this

at line 90
static string cleanName(string $name)

Parameters

string $name

Return Value

string $name

at line 111
ArrayCollection getGroups()

Return Value

ArrayCollection

at line 121
Group addGroup(Group $group)

Parameters

Group $group

Return Value

Group

at line 135
Group removeGroup(Group $group)

Parameters

Group $group

Return Value

Group

at line 151
string getClassName()

Get a classified version of current role name.

It replace underscores by dashes and lowercase.

Return Value

string

at line 158
boolean required()

Return Value

boolean

at line 174
__construct(string $name = null)

Create a new Role with its string representation.

Parameters

string $name Role name