You are here

public function YamlFormTemplatesController::__construct in YAML Form 8

Constructs a YamlFormTemplatesController object.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: Current user.

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

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

File

modules/yamlform_templates/src/Controller/YamlFormTemplatesController.php, line 54

Class

YamlFormTemplatesController
Provides route responses for form templates.

Namespace

Drupal\yamlform_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->yamlformStorage = $entity_type_manager
    ->getStorage('yamlform');
}