public function NodeFormController::preview

Form submission handler for the 'preview' action.

Parameters

$form: An associative array containing the structure of the form.

$form_state: A reference to a keyed array containing the current state of the form.

File

drupal/core/modules/node/lib/Drupal/node/NodeFormController.php, line 395
Definition of Drupal\node\NodeFormController.

Class

NodeFormController
Form controller for the node edit forms.

Namespace

Drupal\node

Code

public function preview(array $form, array &$form_state) {

  // @todo Remove this: we should not have explicit includes in autoloaded
  //   classes.
  module_load_include('inc', 'node', 'node.pages');
  drupal_set_title(t('Preview'), PASS_THROUGH);
  $form_state['node_preview'] = node_preview($this->entity);
  $form_state['rebuild'] = TRUE;
}