uid.inc File Reference

(1.1.2.2 2008/05/27 20:21:12 sdboyer)


Detailed Description

Plugin to provide an argument handler for a user id

Definition in file uid.inc.

Go to the source code of this file.

Functions

 panels_uid_choose_display ($conf, $context)
 panels_uid_context ($arg=NULL, $conf=NULL, $empty=FALSE)
 panels_uid_displays ($conf, $id)
 panels_uid_panels_arguments ()
 panels_uid_settings_form ($conf)
 panels_uid_settings_form_submit (&$values)


Function Documentation

panels_uid_choose_display ( conf,
context 
)

Based upon the settings and the context, choose which display to use.

Definition at line 72 of file uid.inc.

00072                                                     {
00073 }

panels_uid_context ( arg = NULL,
conf = NULL,
empty = FALSE 
)

Discover if this argument gives us the user we crave.

Definition at line 28 of file uid.inc.

References panels_context_create(), and panels_context_create_empty().

00028                                                                        {
00029   // If unset it wants a generic, unfilled context.
00030   if ($empty) {
00031     return panels_context_create_empty('user');
00032   }
00033 
00034   if (!is_numeric($arg)) {
00035     return FALSE;
00036   }
00037 
00038   $user = user_load(array('uid' => $arg));
00039   if (!$user) {
00040     return FALSE;
00041   }
00042 
00043   return panels_context_create('user', $user);
00044 }

Here is the call graph for this function:

panels_uid_displays ( conf,
id 
)

What additional displays does this argument provide?

Definition at line 65 of file uid.inc.

00065                                          {
00066   return array();
00067 }

panels_uid_panels_arguments (  ) 

Definition at line 10 of file uid.inc.

00010                                        {
00011   $args['uid'] = array(
00012     'title' => t("User ID"),
00013     // keyword to use for %substitution
00014     'keyword' => 'user',
00015     'description' => t('Creates a user object from the argument.'),
00016     'context' => 'panels_uid_context',
00017     'settings form' => 'panels_uid_settings_form',
00018     'settings form submit' => 'panels_uid_settings_form_submit',
00019     'displays' => 'panels_uid_displays',
00020     'choose display' => 'panels_uid_choose_display',
00021   );
00022   return $args;
00023 }

panels_uid_settings_form ( conf  ) 

Settings form for the argument

Definition at line 49 of file uid.inc.

00049                                          {
00050   // Doing different displays based upon role is hard because roles are not
00051   // 1:1 like type/vocabulary are for node and term.
00052 }

panels_uid_settings_form_submit ( &$  values  ) 

There appears to be a bit of a bug with the way we're handling forms; it causes 'checkboxes' to get invalid values added to them when empty. This takes care of that.

Definition at line 59 of file uid.inc.

00059                                                    {
00060 }


Generated on Thu Jul 29 05:00:15 2010 for Panels 2 by  doxygen 1.5.6