function profile2_revision_overview in Profile 2 7.2
Generate an overview table of older revisions of a profile.
1 call to profile2_revision_overview()
1 string reference to 'profile2_revision_overview'
- profile2_page_menu in contrib/
profile2_page.module - Implements hook_menu().
File
- ./
profile2.module, line 1550 - Support for configurable user profiles.
Code
function profile2_revision_overview($profile) {
$account = user_load($profile->uid);
drupal_set_title(t('Revisions for %profile_type profile of %user', array(
'%profile_type' => $profile->label,
'%user' => $account->name,
)), PASS_THROUGH);
$header = array(
t('Revision'),
array(
'data' => t('Operations'),
'colspan' => 2,
),
);
$data = profile2_revision_list_build($profile);
$rows = array();
foreach ($data as $item) {
$rows[] = array_merge($item['row'], $item['operations']);
}
$build['profile2_revisions_table'] = array(
'#theme' => 'table',
'#rows' => $rows,
'#header' => $header,
);
return $build;
}