function NodePreviewForm::__construct

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

Constructs a new NodePreviewForm.

Parameters

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

File

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

Class

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

Namespace

Drupal\node\Form

Code

public function __construct(EntityDisplayRepositoryInterface $entity_display_repository, ConfigFactoryInterface $config_factory) {
    $this->entityDisplayRepository = $entity_display_repository;
    $this->configFactory = $config_factory;
}

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