You are here

function _panels_edit in Panels 7.3

Same name and namespace in other branches
  1. 5.2 includes/ \_panels_edit()
  2. 6.3 includes/ \_panels_edit()
  3. 6.2 includes/ \_panels_edit()

Handle calling and processing of the form for editing display content.

Helper function for panels_edit().

See also

panels_edit() for details on the various behaviors of this function.

1 call to _panels_edit()
panels_edit in ./panels.module
Main API entry point to edit a panel display.


includes/, line 17
Core Panels API include file containing various display-editing functions. This includes all the basic editing forms (content, layout, layout settings) as well as the ajax modal forms associated with them.


function _panels_edit($display, $destination, $content_types, $title = FALSE) {
  $did = $display->did;
  if (!$did) {
    $display->did = $did = 'new';

  // Load the display being edited from cache, if possible.
  if (!empty($_POST) && is_object($cache = panels_edit_cache_get($did))) {
    $display = $cache->display;
  else {
    $cache = panels_edit_cache_get_default($display, $content_types, $title);

  // Get a renderer.
  $renderer = panels_get_renderer_handler('editor', $display);
  $renderer->cache = $cache;
  $output = $renderer
  if (is_object($output) && $destination) {
    return panels_goto($destination);
  return $output;