Go to the source code of this file.
Functions | |
| panels_admin_content_types_user_profile () | |
| panels_admin_title_user_profile ($conf, $context) | |
| panels_content_user_profile ($conf, $panel_args, $context) | |
| panels_user_profile_panels_content_types () | |
| panels_admin_content_types_user_profile | ( | ) |
Return all content types available.
Definition at line 61 of file user_profile.inc.
References panels_get_path().
00061 { 00062 return array( 00063 'description' => array( 00064 'title' => t('User profile'), 00065 'icon' => 'icon_user.png', 00066 'path' => panels_get_path('content_types/user'), 00067 'description' => t('The profile of a user.'), 00068 'required context' => new panels_required_context(t('User'), 'user'), 00069 'category' => array(t('User context'), -9), 00070 ), 00071 ); 00072 }
| panels_admin_title_user_profile | ( | $ | conf, | |
| $ | context | |||
| ) |
Display the administrative title for a panel pane in the drag & drop UI
Definition at line 77 of file user_profile.inc.
| panels_content_user_profile | ( | $ | conf, | |
| $ | panel_args, | |||
| $ | context | |||
| ) |
Output function for the 'node' content type. Outputs a node based on the module and delta supplied in the configuration.
Definition at line 23 of file user_profile.inc.
00023 { 00024 $account = isset($context->data) ? drupal_clone($context->data) : NULL; 00025 $block = new stdClass(); 00026 $block->module = 'term-list'; 00027 00028 if ($account === FALSE || ($account->access == 0 && !user_access('administer users'))) { 00029 return drupal_not_found(); 00030 } 00031 // Retrieve and merge all profile fields: 00032 $fields = array(); 00033 foreach (module_list() as $module) { 00034 if ($data = module_invoke($module, 'user', 'view', '', $account)) { 00035 foreach ($data as $category => $items) { 00036 foreach ($items as $key => $item) { 00037 $item['class'] = "$module-". $item['class']; 00038 $fields[$category][$key] = $item; 00039 } 00040 } 00041 } 00042 } 00043 00044 // Let modules change the returned fields - useful for personal privacy 00045 // controls. Since modules communicate changes by reference, we cannot use 00046 // module_invoke_all(). 00047 foreach (module_implements('profile_alter') as $module) { 00048 $function = $module .'_profile_alter'; 00049 $function($account, $fields); 00050 } 00051 00052 $block->title = check_plain($account->name); 00053 $block->content = theme('user_profile', $account, $fields); 00054 00055 return $block; 00056 }
| panels_user_profile_panels_content_types | ( | ) |
Callback function to supply a list of content types.
Definition at line 8 of file user_profile.inc.
00008 { 00009 $items['user_profile'] = array( 00010 'title' => t('User profile'), 00011 'content_types' => 'panels_admin_content_types_user_profile', 00012 'single' => TRUE, 00013 'render callback' => 'panels_content_user_profile', 00014 'title callback' => 'panels_admin_title_user_profile', 00015 ); 00016 return $items; 00017 }
1.5.6