user.inc
Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 function panels_user_panels_contexts() {
00012 $args['user'] = array(
00013 'title' => t("User"),
00014 'description' => t('A single user object.'),
00015 'context' => 'panels_context_create_user',
00016 'settings form' => 'panels_context_user_settings_form',
00017 'settings form validate' => 'panels_context_user_settings_form_validate',
00018 'keyword' => 'user',
00019 'no ui' => TRUE,
00020 'context name' => 'user',
00021 );
00022 return $args;
00023 }
00024
00025
00026
00027
00028
00029 function panels_context_create_user($empty, $data = NULL, $conf = FALSE) {
00030 $context = new panels_context('user');
00031 $context->plugin = 'user';
00032
00033 if ($empty) {
00034 return $context;
00035 }
00036
00037 if ($conf) {
00038 $data = user_load(array('uid' => $data['uid']));
00039 }
00040
00041 if (!empty($data)) {
00042 $context->data = $data;
00043 $context->title = $data->name;
00044 $context->argument = $data->uid;
00045 return $context;
00046 }
00047 }
00048
00049 function panels_context_user_settings_form($conf, $external = FALSE) {
00050 $form = array();
00051 return $form;
00052 }
00053