You are here

public function WebformUiElementTestForm::getWebformElementPlugin in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_ui/src/Form/WebformUiElementTestForm.php \Drupal\webform_ui\Form\WebformUiElementTestForm::getWebformElementPlugin()

Return the webform element associated with this form.

Return value

\Drupal\webform\Plugin\WebformElementInterface A webform element.

Overrides WebformUiElementFormBase::getWebformElementPlugin

1 call to WebformUiElementTestForm::getWebformElementPlugin()
WebformUiElementTestForm::buildForm in modules/webform_ui/src/Form/WebformUiElementTestForm.php
Form constructor.

File

modules/webform_ui/src/Form/WebformUiElementTestForm.php, line 242

Class

WebformUiElementTestForm
Provides a test webform for webform elements.

Namespace

Drupal\webform_ui\Form

Code

public function getWebformElementPlugin() {
  if (empty($this->element)) {
    return $this->elementManager
      ->getElementInstance([
      '#type' => $this->type,
    ]);
  }
  else {
    return parent::getWebformElementPlugin();
  }
}