You are here

function PanelizerEntityDefault::wrap_default_panelizer_pages in Panelizer 7.3

Provides a wrapper for the panelizer page output.

Drupal only supports 2 levels of tabs, but we need a 3rd level. We will fake it.

File

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

Class

PanelizerEntityDefault
Base class for the Panelizer Entity plugin.

Code

function wrap_default_panelizer_pages($bundle, $output) {
  list($bundle, $view_mode) = explode('.', $bundle);
  $base_url = $this->entity_admin_root . '/panelizer/' . $view_mode;

  // We have to sub in the bundle if this is set.
  if (is_numeric($this->entity_admin_bundle)) {
    $bits = explode('/', $base_url);
    $bits[$this->entity_admin_bundle] = $bundle;
    $base_url = implode('/', $bits);
  }
  return $this
    ->make_fake_tabs($base_url, $bundle, $view_mode, $output);
}