function total_control_overview_user_content_type_render in Total Control Admin Dashboard 7.2
Same name and namespace in other branches
- 6.2 plugins/content_types/overview_user.inc \total_control_overview_user_content_type_render()
- 6 plugins/content_types/overview_user.inc \total_control_overview_user_content_type_render()
Run-time rendering of the body of the block.
File
- plugins/
content_types/ overview_user.inc, line 44
Code
function total_control_overview_user_content_type_render($subtype, $conf, $panel_args, &$context) {
$user_data = total_control_get_user_overview($conf);
$overview = array();
$overview['all'] = format_plural($user_data['all'], '1 user account', '@count total user accounts');
$overview['active'] = format_plural($user_data['active'], '1 active user account', '@count active user accounts');
$overview['blocked'] = format_plural($user_data['blocked'], '1 blocked user account', '@count blocked user accounts');
foreach ($user_data['roles'] as $rid => $data) {
$overview['roles_' . $rid] = format_plural($user_data['roles'][$rid]['count'], '1 user account', '@count user accounts');
$overview['roles_' . $rid] .= ' with the role: ' . $user_data['roles'][$rid]['name'];
}
$block = new stdClass();
$block->module = t('total_control');
$block->title = t('Overview of user accounts');
$block->content = theme('total_control_overview_user', array(
'overview' => $overview,
));
return $block;
}