function _workflow_rids_to_roles in Workflow 7
Translates a string of rids to role names for exporting.
Parameters
$rid_string: A string of rids or fake 'author' role.
Return value
A string of role names separated by commas.
1 call to _workflow_rids_to_roles()
- workflow_get_workflows_full_object in ./
workflow.features.inc - For use by CRUD only, gather everything into the CRUD formed object.
File
- ./
workflow.features.inc, line 268 - Integrates workflow with features.
Code
function _workflow_rids_to_roles($rid_string) {
$roles = _workflow_user_roles();
$rid_array = explode(',', $rid_string);
// There may be a role named 'author', so make 'author' distinct.
$return = in_array('author', $rid_array) ? WORKFLOW_FEATURES_AUTHOR_NAME . ',' : '';
// Translate RIDs to rolenames.
$return .= implode(',', array_intersect_key($roles, array_flip($rid_array)));
return trim($return, ',');
}