You are here

public function WebformTranslationConfigManager::__construct in Webform 6.x

Constructs a WebformTranslationConfigManager object.

Parameters

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

\Drupal\Core\Form\FormBuilderInterface $form_builder: The form builder.

\Drupal\webform\Plugin\WebformElementManagerInterface $element_manager: The webform element manager.

\Drupal\webform\WebformTranslationManagerInterface $translation_manager: The webform translation manager.

\Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager: The typed config manager.

File

src/WebformTranslationConfigManager.php, line 95

Class

WebformTranslationConfigManager
Defines a class to translate webform config.

Namespace

Drupal\webform

Code

public function __construct(ModuleHandlerInterface $module_handler, FormBuilderInterface $form_builder, WebformElementManagerInterface $element_manager, WebformTranslationManagerInterface $translation_manager, TypedConfigManagerInterface $typed_config_manager = null) {
  $this->formBuilder = $form_builder;
  $this->moduleHandler = $module_handler;
  $this->elementManager = $element_manager;
  $this->translationManager = $translation_manager;

  // @todo [Webform 7.x] Require the typed config manager.
  $this->typedConfigManager = $typed_config_manager ?: \Drupal::service('config.typed');
}