You are here

function _panelizer_load_default in Panelizer 6

Same name and namespace in other branches
  1. 7 panelizer.module \_panelizer_load_default()

Load a panelizer default object.

2 calls to _panelizer_load_default()
panelizer_load_default in ./panelizer.module
Fetch the panelizer default record for a panelizer name.
panelizer_load_default_by_name in ./panelizer.module
Fetch the panelizer default record for a panelizer name.

File

./panelizer.module, line 395
panelizer.module

Code

function _panelizer_load_default($type, $key, $name, $load_name, $default_anyway = FALSE) {
  if (!$default_anyway && !panelizer_has_default($type, $key)) {
    return;
  }
  ctools_include('export');
  $panelizer = ctools_export_crud_load('panelizer_defaults', $load_name);
  if (empty($panelizer)) {
    $panelizer = ctools_export_crud_new('panelizer_defaults');
    $panelizer->panelizer_type = $type;
    $panelizer->panelizer_key = $key;
    $panelizer->name = $load_name;
    $panelizer->display = panelizer_get_default_display($type);
  }
  return $panelizer;
}