You are here

function _config_pages_get_internal_default_panelizer in Config Pages 7

Return default display settings.

1 call to _config_pages_get_internal_default_panelizer()
config_pages_form_submit_panelize in ./config_pages.admin.inc
Submit callback to panelize config page.

File

./config_pages.inc, line 10
Logic functions.

Code

function _config_pages_get_internal_default_panelizer($bundle, $view_mode) {
  ctools_include('export');
  $load_name = implode(':', array(
    'config_pages',
    $bundle,
    'default',
  ));
  $panelizer = ctools_export_crud_new('panelizer_defaults');
  $panelizer->name = $load_name;

  // Attach the view mode to the name, which is specially generated
  // to ignore the specialty "page_manager" view mode.
  if ($view_mode != 'page_manager') {
    $panelizer->name .= ':' . $view_mode;
  }

  // This is a straight up empty display.
  $display = panels_new_display();
  $display->layout = 'flexible';
  $panelizer->panelizer_type = 'config_pages';
  $panelizer->panelizer_key = $bundle;
  $panelizer->view_mode = $view_mode;
  $panelizer->display = $display;
  $panelizer->api_version = 1;
  $panelizer->title = t('Default');
  return $panelizer;
}