You are here

function panels_page_edit_layout in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels_page/panels_page.admin.inc \panels_page_edit_layout()

Pass through to the panels layout editor.

2 string references to 'panels_page_edit_layout'
panels_page_admin_dynamic_menu_items in panels_page/panels_page.menu.inc
_panels_page_construct_dynamic_menu_link in panels_page/panels_page.menu.inc
Helper function to create a menu item for a panel.

File

panels_page/panels_page.admin.inc, line 735
panels_page.admin.inc

Code

function panels_page_edit_layout($panel_page) {

  // The following form will return the $display upon successful submit, if
  // we didn't send the $dest. Which we don't, here. That way we can update
  // our panel_page if necessary and do our own goto.
  $output = panels_edit_layout($panel_page->display, t('Save'));
  if (is_object($output)) {
    $panel_page->display = $output;
    panels_page_save_display($panel_page);
    $dest = "admin/panels/panel-page/{$panel_page->name}/edit/layout";
    if ($panel_page->current != 'primary') {
      $dest .= '/' . $panel_page->current;
    }
    drupal_goto($dest);
  }
  drupal_set_title(check_plain(panels_page_get_title($panel_page)));
  return $output;
}