Go to the source code of this file.
Functions | |
| panels_admin_content_types_term_description () | |
| panels_admin_title_term_description ($conf, $context) | |
| panels_content_term_description ($conf, $panel_args, $context) | |
| panels_term_description_panels_content_types () | |
| panels_admin_content_types_term_description | ( | ) |
Return all content types available.
Definition at line 56 of file term_description.inc.
References panels_get_path().
00056 { 00057 return array( 00058 'description' => array( 00059 'title' => t('Term description'), 00060 'icon' => 'icon_node.png', 00061 'path' => panels_get_path('content_types/node'), 00062 'description' => t('Term description.'), 00063 'required context' => new panels_required_context(t('Term'), 'term'), 00064 'category' => array(t('Term context'), -9), 00065 ), 00066 ); 00067 }
| panels_admin_title_term_description | ( | $ | conf, | |
| $ | context | |||
| ) |
| panels_content_term_description | ( | $ | 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 26 of file term_description.inc.
00026 { 00027 $term = isset($context->data) ? drupal_clone($context->data) : NULL; 00028 $block = new stdClass(); 00029 $block->module = 'node_type'; 00030 00031 $block->subject = $term->name; 00032 if ($term) { 00033 $block->content = _filter_autop(filter_xss_admin($term->description)); 00034 $block->delta = $term->tid; 00035 00036 if (user_access('administer taxonomy')) { 00037 $block->admin_links['update'] = array( 00038 'title' => t('Edit term'), 00039 'alt' => t("Edit this term"), 00040 'href' => "admin/content/taxonomy/edit/term/$term->tid", 00041 'query' => drupal_get_destination(), 00042 ); 00043 } 00044 } 00045 else { 00046 $block->content = t('Term description goes here.'); 00047 $block->delta = 'unknown'; 00048 } 00049 00050 return $block; 00051 }
| panels_term_description_panels_content_types | ( | ) |
Callback function to supply a list of content types.
Definition at line 8 of file term_description.inc.
00008 { 00009 $items['term_description'] = array( 00010 'title' => t('Term description'), 00011 'content_types' => 'panels_admin_content_types_term_description', 00012 // only provides a single content type 00013 'single' => TRUE, 00014 'render callback' => 'panels_content_term_description', 00015 'add callback' => 'panels_admin_edit_term_description', 00016 'edit callback' => 'panels_admin_edit_term_description', 00017 'title callback' => 'panels_admin_title_term_description', 00018 ); 00019 return $items; 00020 }
1.5.6