function opigno_lms_get_platform_role_id in Opigno LMS 7
Get the default platform role ids.
Parameters
string $key:
Return value
int
Related topics
1 call to opigno_lms_get_platform_role_id()
- opigno_lms_set_platform_permissions in ./
opigno_lms.profile - Set platform permissions for specific roles. This function is globally available and modules and apps should use it to set default permissions, simplifying module installation and site management.
File
- ./
opigno_lms.profile, line 505 - Enables modules and site configuration for a standard site installation. Provides a default API for Apps and modules to use. This will simplify the user experience.
Code
function opigno_lms_get_platform_role_id($key) {
$roles =& drupal_static(__FUNCTION__);
if (empty($roles)) {
$roles = variable_get('opigno_lms_default_platform_roles', array());
}
return !empty($roles[$key]) ? $roles[$key] : 0;
}