function NodePreviewForm::create

Same name in other branches
  1. 8.9.x core/modules/node/src/Form/NodePreviewForm.php \Drupal\node\Form\NodePreviewForm::create()
  2. 10 core/modules/node/src/Form/NodePreviewForm.php \Drupal\node\Form\NodePreviewForm::create()
  3. 11.x core/modules/node/src/Form/NodePreviewForm.php \Drupal\node\Form\NodePreviewForm::create()

Overrides FormBase::create

File

core/modules/node/src/Form/NodePreviewForm.php, line 37

Class

NodePreviewForm
Contains a form for switching the view mode of a node during preview.

Namespace

Drupal\node\Form

Code

public static function create(ContainerInterface $container) {
    return new static($container->get('entity_display.repository'), $container->get('config.factory'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.