You are here

public function WebformUiElementTypeFormBase::__construct in Webform 8.5

Constructs a WebformUiElementTypeFormBase object.

Parameters

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

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

\Drupal\user\UserDataInterface $user_data: The user data service.

File

modules/webform_ui/src/Form/WebformUiElementTypeFormBase.php, line 74

Class

WebformUiElementTypeFormBase
Provides a abstract element type webform for a webform element.

Namespace

Drupal\webform_ui\Form

Code

public function __construct(WebformElementManagerInterface $element_manager, AccountInterface $current_user, UserDataInterface $user_data) {
  $this->elementManager = $element_manager;
  $this->currentUser = $current_user;
  $this->userData = $user_data;
  $this->webform = Webform::create([
    'id' => '_webform_ui_temp_form',
  ]);
  $this->webformSubmission = WebformSubmission::create([
    'webform' => $this->webform,
  ]);
}