You are here

public function WebformRouteSubscriber::__construct in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Routing/WebformRouteSubscriber.php \Drupal\webform\Routing\WebformRouteSubscriber::__construct()

Constructs a WebformShareRouteSubscriber object.

Parameters

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

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

File

src/Routing/WebformRouteSubscriber.php, line 37

Class

WebformRouteSubscriber
Adds the _admin_route option to webform routes.

Namespace

Drupal\webform\Routing

Code

public function __construct(ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory = NULL) {
  $this->moduleHandler = $module_handler;
  $this->configFactory = $config_factory ?: \Drupal::configFactory();
}