Go to the source code of this file.
Functions | |
| panels_user_from_node_context ($context=NULL, $conf) | |
| panels_user_from_node_panels_relationships () | |
| panels_user_from_node_context | ( | $ | context = NULL, |
|
| $ | conf | |||
| ) |
Return a new context based on an existing context
Definition at line 22 of file user_from_node.inc.
References panels_context_create(), and panels_context_create_empty().
00022 { 00023 // If unset it wants a generic, unfilled context, which is just NULL 00024 if (empty($context->data)) { 00025 return panels_context_create_empty('user', NULL); 00026 } 00027 if (isset($context->data->uid)) { 00028 // Load the user that is the author of the node 00029 $uid = $context->data->uid; 00030 $account = user_load(array('uid' => $uid)); 00031 00032 // Send it to panels 00033 return panels_context_create('user', $account); 00034 } 00035 else { 00036 return panels_context_create_empty('user', NULL); 00037 } 00038 }
| panels_user_from_node_panels_relationships | ( | ) |
Plugin to provide an relationship handler for node from user
Definition at line 8 of file user_from_node.inc.
00008 { 00009 $args['user_from_node'] = array( 00010 'title' => t("User from node"), 00011 'keyword' => 'user', 00012 'description' => t('Adds a user from node author context'), 00013 'required context' => new panels_required_context(t('Node'), 'node'), 00014 'context' => 'panels_user_from_node_context', 00015 ); 00016 return $args; 00017 }
1.5.6