function theme_apply_for_role_status in Apply for role 7
Same name and namespace in other branches
- 5 apply_for_role.module \theme_apply_for_role_status()
- 6 apply_for_role.module \theme_apply_for_role_status()
- 7.2 apply_for_role.module \theme_apply_for_role_status()
Returns a traslatable string for a constant.
Parameters
$status: An associative array containing a name for each constant.
Return value
A traslatable string for a constant.
3 theme calls to theme_apply_for_role_status()
- apply_for_role_admin_form in ./
apply_for_role.admin.inc - apply_for_role_tokens in ./
apply_for_role.token.inc - Implements hook_tokens().
- apply_for_role_views_handler_field_status_name::render in views/
handlers/ apply_for_role_views_handler_field_status_name.inc - Render the field.
File
- ./
apply_for_role.module, line 207 - Allows users to apply for roles.
Code
function theme_apply_for_role_status($variables) {
$status = is_numeric($variables['status']) ? $variables['status'] : NULL;
$statuses = array(
APPLY_FOR_ROLE_REMOVED => t('Removed'),
APPLY_FOR_ROLE_PENDING => t('Pending'),
APPLY_FOR_ROLE_APPROVED => t('Approved'),
APPLY_FOR_ROLE_DENIED => t('Denied'),
);
return isset($statuses[$status]) ? $statuses[$status] : t('Unknown status');
}