You are here

public function FormModesSubscriber::__construct in Form mode manager 8.2

Same name and namespace in other branches
  1. 8 src/Routing/EventSubscriber/FormModesSubscriber.php \Drupal\form_mode_manager\Routing\EventSubscriber\FormModesSubscriber::__construct()

Constructs a new RouteSubscriber object.

Parameters

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

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

\Drupal\form_mode_manager\FormModeManagerInterface $form_mode_manager: The form mode manager.

\Drupal\form_mode_manager\EntityRoutingMapManager $plugin_routes_manager: Plugin EntityRoutingMap to retrieve entity form operation routes.

File

src/Routing/EventSubscriber/FormModesSubscriber.php, line 97

Class

FormModesSubscriber
Listens to the dynamic route event and add routes using form modes.

Namespace

Drupal\form_mode_manager\Routing\EventSubscriber

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository, FormModeManagerInterface $form_mode_manager, EntityRoutingMapManager $plugin_routes_manager) {
  $this->entityTypeManager = $entity_type_manager;
  $this->entityDisplayRepository = $entity_display_repository;
  $this->formModeManager = $form_mode_manager;
  $this->entityRoutingMap = $plugin_routes_manager;
}