public function NodePreviewForm::submitForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/Form/NodePreviewForm.php \Drupal\node\Form\NodePreviewForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- core/
modules/ node/ src/ Form/ NodePreviewForm.php, line 124 - Contains \Drupal\node\Form\NodePreviewForm.
Class
- NodePreviewForm
- Contains a form for switching the view mode of a node during preview.
Namespace
Drupal\node\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$form_state
->setRedirect('entity.node.preview', array(
'node_preview' => $form_state
->getValue('uuid'),
'view_mode_id' => $form_state
->getValue('view_mode'),
));
}