You are here

function panels_page_edit in Panels 6.2

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

Edit a panel page.

Called from both the add and edit points to provide for common flow.

1 string reference to 'panels_page_edit'
panels_page_admin_dynamic_menu_items in panels_page/panels_page.menu.inc

File

panels_page/panels_page.admin.inc, line 225
panels_page.admin.inc

Code

function panels_page_edit($panel_page, $next = NULL) {
  drupal_set_title(check_plain(panels_page_get_title($panel_page)));
  return drupal_get_form('panels_page_edit_form', $panel_page, $next);

  /*
    $form_state = array(
      'panel_page' => $panel_page,
      'pid' => $panel_page->pid,
      'next' => $next,
    );
    $output = drupal_build_form('panels_page_edit_form', $form_state);
    // no output == submit
    if (!$output) {
      if (!empty($form_state['clicked_button']['#save-display'])) {
        drupal_set_message(t('Panel content has been updated.'));
        panels_save_display($display);
      }
      else {
        drupal_set_message(t('Your changes have been discarded.'));
      }

      panels_cache_clear('display', $display->did);
      if ($destination) {
        return drupal_goto($destination);
      }
      return $form_state['display'];
    }

    return $output;*/
}