You are here

function panelizer_get_allowed_layouts_option in Panelizer 7.3

Gets the current layout options approach for an entity bundle.

Parameters

string $type: The entity type.

string $bundle: The entity bundle.

Return value

string The name of the layout approach to check (default or per bundle).

3 calls to panelizer_get_allowed_layouts_option()
PanelizerEntityDefault::page_layout in plugins/entity/PanelizerEntityDefault.class.php
panelizer_default_layout_page in includes/admin.inc
Pass through to the panels layout editor.
panelizer_panels_cache_get in ./panelizer.module
Implements hook_panels_cache_get().

File

./panelizer.module, line 1731
The Panelizer module attaches panels to entities, providing default panels and allowing each panel to be configured independently by privileged users.

Code

function panelizer_get_allowed_layouts_option($type, $bundle) {
  if (variable_get('panelizer_' . $type . ':' . $bundle . '_allowed_layouts_default', FALSE)) {
    return 'panels_page';
  }
  else {
    return 'panelizer_' . $type . ':' . $bundle;
  }
}