function panels_ct_get_types in Panels 6.2
Same name and namespace in other branches
- 5.2 includes/plugins.inc \panels_ct_get_types()
Get all of the individual types provided by a given content type. This would be all of the blocks for the block type, or all of the views for the view type.
Parameters
$type: The content type to load.
Related topics
7 calls to panels_ct_get_types()
- panels_ajax_add_pane_config in includes/
display-edit.inc - AJAX entry point for to configure a pane that has just been added.
- panels_ajax_cache_method in includes/
display-edit.inc - Entry point for AJAX modal: configure pane cache method
- panels_ajax_cache_settings in includes/
display-edit.inc - Handle the cache settings form
- panels_ajax_configure_pane in includes/
display-edit.inc - AJAX entry point for to configure a pane that has just been added.
- panels_get_all_content_types in includes/
plugins.inc - Get an array of all content types that can be fed into the display editor for the add content list, regardless of availability.
File
- includes/
plugins.inc, line 412 - plugins.inc
Code
function panels_ct_get_types($type) {
if (is_array($type)) {
$content_type = $type;
}
else {
$content_type = panels_get_content_type($type);
}
$function = $content_type['content_types'];
if (is_array($function)) {
return (array) $function;
}
if (function_exists($function)) {
return (array) $function();
}
return array();
}