You are here

public function PanelizerEntityDefault::get_default_panelizer_object in Panelizer 7.2

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

Load the named default panel for the bundle.

Overrides PanelizerEntityInterface::get_default_panelizer_object

1 call to PanelizerEntityDefault::get_default_panelizer_object()
PanelizerEntityDefault::hook_field_attach_submit in plugins/entity/PanelizerEntityDefault.class.php

File

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

Class

PanelizerEntityDefault
Base class for the Panelizer Entity plugin.

Code

public function get_default_panelizer_object($bundle, $name) {

  // If the name is in the format of entitytype:bundle:name which is the machine
  // name used, split that out automatically.
  if (strpos($name, ':') === FALSE) {
    $name = implode(':', array(
      $this->entity_type,
      $bundle,
      $name,
    ));
  }
  ctools_include('export');
  return ctools_export_crud_load('panelizer_defaults', $name);
}