You are here

public function NodePreviewForm::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 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()

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 61

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;
}