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 347
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) {
  drupal_set_title(t('Preview'), PASS_THROUGH);
  $form_state['node_preview'] = node_preview($this
    ->getEntity($form_state));
  $form_state['rebuild'] = TRUE;
}