function panels_common_get_allowed_types in Panels 6.3
Same name and namespace in other branches
- 5.2 includes/common.inc \panels_common_get_allowed_types()
- 6.2 includes/common.inc \panels_common_get_allowed_types()
- 7.3 includes/common.inc \panels_common_get_allowed_types()
Based upon the settings, get the allowed types for this node.
4 calls to panels_common_get_allowed_types()
- panels_mini_panels_cache_get in panels_mini/
panels_mini.module - Get display edit cache for the panels mini export UI
- panels_node_edit_content in panels_node/
panels_node.module - Pass through to the panels content editor.
- panels_page_wizard_panels_cache_get in ./
panels.module - Get display edit cache for the panels mini export UI
- panel_context_panels_cache_get in ./
panels.module - Get display edit cache on behalf of panel context.
File
- includes/
common.inc, line 343 - Functions used by more than one panels client module.
Code
function panels_common_get_allowed_types($module, $contexts = array(), $has_content = FALSE, $default_defaults = array(), $default_allowed_types = array()) {
// Get a list of all types that are available
$default_types = variable_get($module . '_default', $default_defaults);
$allowed_types = variable_get($module . '_allowed_types', $default_allowed_types);
// By default, if they haven't gone and done the initial setup here,
// let all 'other' types (which will be all types) be available.
if (!isset($default_types['other'])) {
$default_types['other'] = TRUE;
}
ctools_include('content');
$content_types = ctools_content_get_available_types($contexts, $has_content, $allowed_types, $default_types);
return $content_types;
}