function panels_common_get_allowed_types in Panels 5.2
Same name and namespace in other branches
- 6.3 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.
3 calls to panels_common_get_allowed_types()
- panels_mini_edit_content in panels_mini/
panels_mini.module - Pass through to the panels content editor.
- panels_node_edit_content in panels_node/
panels_node.module - Pass through to the panels content editor.
- panels_page_edit_content in panels_page/
panels_page.admin.inc - Pass through to the panels content editor.
File
- includes/
common.inc, line 321 - 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 . '_defaults', $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;
}
panels_load_include('plugins');
$content_types = panels_get_available_content_types($contexts, $has_content, $allowed_types, $default_types);
return $content_types;
}