You are here

function panels_common_get_allowed_types in Panels 7.3

Same name and namespace in other branches
  1. 5.2 includes/ \panels_common_get_allowed_types()
  2. 6.3 includes/ \panels_common_get_allowed_types()
  3. 6.2 includes/ \panels_common_get_allowed_types()

Based upon the settings, get the allowed types for this node.

6 calls to panels_common_get_allowed_types()
hook_panels_cache_get in ./panels.api.php
Allow modules to provide their own caching mechanism for the display editor.
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_node_panels_cache_get in panels_node/panels_node.module
Get display edit cache for a panel node being edited.
panels_page_wizard_panels_cache_get in ./panels.module
Get display edit cache for the panels mini export UI.

... See full list


includes/, line 379
Functions used by more than one panels client module.


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;
  $content_types = ctools_content_get_available_types($contexts, $has_content, $allowed_types, $default_types);
  return $content_types;