function group_role_load in Group 7
Load a group role by name.
Parameters
string $name: The name of the group type you want to load.
Return value
GroupRole The loaded GroupRole entity.
3 calls to group_role_load()
- GroupRoleUIController::overviewFormSubmit in classes/
group_role.ui_controller.inc - Overview form submit callback.
- group_role_exists in helpers/
group.inc - Check whether a group role machine name exists.
- group_update_7005 in ./
group.install - Change the group_admin role to be deletable.
File
- helpers/
group_role.entity.inc, line 66 - Entity API related helper functions for group roles.
Code
function group_role_load($name) {
$group_roles = group_roles(array(
$name,
));
return reset($group_roles);
}