function panels_ct_get_types in Panels 5.2
Same name and namespace in other branches
- 6.2 includes/plugins.inc \panels_ct_get_types()
Get all of the individual types provided by a given content types. 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.
3 calls to panels_ct_get_types()
- 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.
- panels_get_available_content_types in includes/
plugins.inc - Get an array of all available content types that can be fed into the display editor for the add content list.
- panels_pane_select_context in includes/
plugins.inc - Select a context for a pane.
File
- includes/
plugins.inc, line 404 - 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();
}