public function GroupRole::grantPermissions in Group 7
Grant permissions to a role.
Parameters
array $permissions: A list of permission names to grant.
1 call to GroupRole::grantPermissions()
- GroupRole::changePermissions in classes/
group_role.inc - Change permissions for a role.
File
- classes/
group_role.inc, line 64 - Defines the Entity API class for group roles.
Class
- GroupRole
- Main class for group role entities.
Code
public function grantPermissions(array $permissions) {
$permissions = array_merge($this->permissions, $permissions);
$this->permissions = array_values(array_unique($permissions));
$this
->save();
}