You are here

function esi_panels__panel_context_save in ESI: Edge Side Includes 7.3

Save the configuration of a panel page.

See also

panels_panel_context_save().

1 string reference to 'esi_panels__panel_context_save'
esi_panels_ctools_plugin_post_alter in modules/esi_panels/esi_panels.module
Implements hook_ctools_plugin_post_alter().

File

modules/esi_panels/esi_panels.module, line 297
ESI handler for panel panes.

Code

function esi_panels__panel_context_save(&$handler, $update) {

  // Override the rendering pipeline if any pane uses ESI.
  // Only the standard rendering pipeline is supported; alternative/IPE/legacy
  // pipelines cannot be used with ESI.
  // @TODO: inform the user of this on the display, if a non-standard renderer
  // is selected.
  if (isset($handler->conf['display']) && is_a($handler->conf['display'], 'panels_display')) {
    $display = $handler->conf['display'];
  }
  else {

    // Attempt to load the display using the DID.
    $display = panels_load_display($handler->conf['did']);
  }
  if (_esi_panels__display_uses_esi($display)) {
    if ($handler->conf['pipeline'] == 'standard' || $handler->conf['pipeline'] == 'ipe') {
      $handler->conf['original_pipeline'] = $handler->conf['pipeline'];
      $handler->conf['pipeline'] = "esi";
    }
  }
  panels_panel_context_save($handler, $update);
}