You are here

public function LayoutBuilderMigrationConfirmForm::__construct in Panelizer 8.5

LayoutBuilderMigrationConfirmForm constructor.

Parameters

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

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.

\Drupal\Core\Routing\RouteMatchInterface $route_match: (optional) The current route match service.

\Drupal\Core\StringTranslation\TranslationInterface $translation: (optional) The string translation service.

File

src/Form/LayoutBuilderMigrationConfirmForm.php, line 48

Class

LayoutBuilderMigrationConfirmForm
A confirmation form for migrating an entity display to Layout Builder.

Namespace

Drupal\panelizer\Form

Code

public function __construct(EntityDisplayRepositoryInterface $entity_display_repository, EntityTypeManagerInterface $entity_type_manager, RouteMatchInterface $route_match = NULL, TranslationInterface $translation = NULL) {
  $this->entityDisplayRepository = $entity_display_repository;
  $this->entityTypeManager = $entity_type_manager;
  $this->routeMatch = $route_match;
  if ($translation) {
    $this
      ->setStringTranslation($translation);
  }
}