Go to the source code of this file.
Functions | |
| panels_admin_content_types_form () | |
| panels_admin_title_form ($conf, $context) | |
| panels_content_form ($conf, $panel_args, &$context) | |
| panels_form_panels_content_types () | |
| panels_admin_content_types_form | ( | ) |
Return all content types available.
Definition at line 26 of file form.inc.
References panels_get_path().
00026 { 00027 return array( 00028 'node_type' => array( 00029 'title' => t('General form'), 00030 'icon' => 'icon_node.png', 00031 'path' => panels_get_path('content_types/node'), 00032 'description' => t('The general parts of a form.'), 00033 'required context' => new panels_required_context(t('Form'), 'form'), 00034 'category' => array(t('Form'), -9), 00035 ), 00036 ); 00037 }
| panels_admin_title_form | ( | $ | conf, | |
| $ | context | |||
| ) |
| panels_content_form | ( | $ | 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 43 of file form.inc.
00043 { 00044 $block = new stdClass(); 00045 $block->module = 'form'; 00046 00047 if (isset($context->form)) { 00048 $block->subject = $context->form_title; 00049 if (!empty($context->form_id)) { 00050 // If this is a form, drupal_render it. 00051 $block->content = drupal_render($context->form); 00052 } 00053 else { 00054 // Otherwise just spit back what we were given. This is probably an 00055 // error message or something. 00056 $block->content = $context->form; 00057 } 00058 $block->delta = $context->form_id; 00059 } 00060 else { 00061 $block->subject = t('Form'); 00062 $block->content = t('Form goes here.'); 00063 $block->delta = 'unknown'; 00064 } 00065 00066 return $block; 00067 }
| panels_form_panels_content_types | ( | ) |
Callback function to supply a list of content types.
Definition at line 8 of file form.inc.
00008 { 00009 $items['form'] = array( 00010 'title' => t('Generic form'), 00011 'content_types' => 'panels_admin_content_types_form', 00012 // only provides a single content type 00013 'single' => TRUE, 00014 'render callback' => 'panels_content_form', 00015 'add callback' => 'panels_admin_edit_form', 00016 'edit callback' => 'panels_admin_edit_form', 00017 'title callback' => 'panels_admin_title_form', 00018 'render last' => TRUE, 00019 ); 00020 return $items; 00021 }
1.5.6