You are here

public function PanelizerEntityDefault::get_internal_default_panelizer in Panelizer 7.2

Same name and namespace in other branches
  1. 7.3 plugins/entity/PanelizerEntityDefault.class.php \PanelizerEntityDefault::get_internal_default_panelizer()

An internal representation of a panelizer object, used to seed when we have none and want something to get started.

2 calls to PanelizerEntityDefault::get_internal_default_panelizer()
PanelizerEntityDefault::hook_panelizer_defaults in plugins/entity/PanelizerEntityDefault.class.php
Implements a delegated hook_panelizer_defaults().
PanelizerEntityDefault::page_settings in plugins/entity/PanelizerEntityDefault.class.php
Switched page callback to give the settings form.

File

plugins/entity/PanelizerEntityDefault.class.php, line 1308
Base class for the Panelizer Entity plugin.

Class

PanelizerEntityDefault
Base class for the Panelizer Entity plugin.

Code

public function get_internal_default_panelizer($bundle) {
  ctools_include('export');
  $load_name = implode(':', array(
    $this->entity_type,
    $bundle,
    'default',
  ));
  $panelizer = ctools_export_crud_new('panelizer_defaults');
  $panelizer->panelizer_type = $this->entity_type;
  $panelizer->panelizer_key = $bundle;
  $panelizer->name = $load_name;
  $panelizer->display = $this
    ->get_default_display();
  $panelizer->api_version = 1;
  $panelizer->title = t('Default');
  return $panelizer;
}