function views_ui_edit_display_form

Form constructor callback to edit display of a view

1 string reference to 'views_ui_edit_display_form'
views_ui_ajax_forms in drupal/core/modules/views/views_ui/admin.inc
Returns information about subforms for editing the pieces of a view.

File

drupal/core/modules/views/views_ui/admin.inc, line 731
Provides the Views' administrative interface.

Code

function views_ui_edit_display_form($form, &$form_state) {
  $view =& $form_state['view'];
  $display_id = $form_state['display_id'];
  $section = $form_state['section'];
  $executable = $view
    ->get('executable');
  if (!$executable
    ->setDisplay($display_id)) {
    views_ajax_error(t('Invalid display id @display', array(
      '@display' => $display_id,
    )));
  }
  $display =& $executable->display[$display_id];

  // Get form from the handler.
  $form['options'] = array(
    '#theme_wrappers' => array(
      'container',
    ),
    '#attributes' => array(
      'class' => array(
        'scroll',
      ),
    ),
  );
  $executable->display_handler
    ->buildOptionsForm($form['options'], $form_state);

  // The handler options form sets $form['#title'], which we need on the entire
  // $form instead of just the ['options'] section.
  $form['#title'] = $form['options']['#title'];
  unset($form['options']['#title']);

  // Move the override dropdown out of the scrollable section of the form.
  if (isset($form['options']['override'])) {
    $form['override'] = $form['options']['override'];
    unset($form['options']['override']);
  }
  $name = NULL;
  if (isset($form_state['update_name'])) {
    $name = $form_state['update_name'];
  }
  $view
    ->getStandardButtons($form, $form_state, 'views_ui_edit_display_form', $name);
  return $form;
}