class GroupManager implements BasicEntityManagerInterface

Class GroupManager is injected as alligator.group.manager service. GroupManager handles the logic for entity.

Properties

protected GroupRepository $repository
protected GroupEventContainer $container

Methods

__construct(GroupRepository $repository, GroupEventContainer $container)

No description

array
findAllGroups()

Get all groups

addGroup(Group $newGroup)

Save new group

Group|bool
editGroup(Group $group)

Update existing group

bool
deleteGroup(Group $group, int $newParentId)

Remove group

getGroupById(int $id)

Get single group by id

mixed
getRolesTree()

Get formatted tree

Details

at line 39
__construct(GroupRepository $repository, GroupEventContainer $container)

Parameters

GroupRepository $repository
GroupEventContainer $container

at line 49
array findAllGroups()

Get all groups

Return Value

array

at line 60
Group addGroup(Group $newGroup)

Save new group

Parameters

Group $newGroup

Return Value

Group

at line 78
Group|bool editGroup(Group $group)

Update existing group

Parameters

Group $group

Return Value

Group|bool

at line 111
bool deleteGroup(Group $group, int $newParentId)

Remove group

Parameters

Group $group
int $newParentId

Return Value

bool

at line 137
Group getGroupById(int $id)

Get single group by id

Parameters

int $id

Return Value

Group

at line 150
mixed getRolesTree()

Get formatted tree

Return Value

mixed