You are here

public function WebformBreadcrumbBuilder::__construct in Webform 6.x

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

Constructs a WebformBreadcrumbBuilder object.

Parameters

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

\Drupal\webform\WebformRequestInterface $request_handler: The webform request handler.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

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

File

src/Breadcrumb/WebformBreadcrumbBuilder.php, line 65

Class

WebformBreadcrumbBuilder
Provides a webform breadcrumb builder.

Namespace

Drupal\webform\Breadcrumb

Code

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