You are here

public function WebformTemplatesController::__construct in Webform 8.5

Constructs a WebformTemplatesController object.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The current user.

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

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

File

modules/webform_templates/src/Controller/WebformTemplatesController.php, line 54

Class

WebformTemplatesController
Provides route responses for webform templates.

Namespace

Drupal\webform_templates\Controller

Code

public function __construct(AccountInterface $current_user, FormBuilderInterface $form_builder, EntityTypeManagerInterface $entity_type_manager) {
  $this->currentUser = $current_user;
  $this->formBuilder = $form_builder;
  $this->webformStorage = $entity_type_manager
    ->getStorage('webform');
}