You are here

public function FormModeManagerContextualLinks::__construct in Form mode manager 8.2

Constructs a new FormModeManagerContextualLinks object.

Parameters

\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/Plugin/Derivative/FormModeManagerContextualLinks.php, line 56

Class

FormModeManagerContextualLinks
Provides contextual links definitions for all entity bundles.

Namespace

Drupal\form_mode_manager\Plugin\Derivative

Code

public function __construct(FormModeManagerInterface $form_mode_manager, EntityRoutingMapManager $plugin_routes_manager) {
  $this->formModeManager = $form_mode_manager;
  $this->cacheTags = $form_mode_manager
    ->getListCacheTags();
  $this->formModesDefinitionsList = $form_mode_manager
    ->getAllFormModesDefinitions();
  $this->entityRoutingMap = $plugin_routes_manager;
}