You are here

public function WebformCustomComposite::form in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/WebformCustomComposite.php \Drupal\webform\Plugin\WebformElement\WebformCustomComposite::form()

Gets the actual configuration webform array to be built.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array An associative array contain the element's configuration webform without any default values.

Overrides WebformCompositeBase::form

File

src/Plugin/WebformElement/WebformCustomComposite.php, line 135

Class

WebformCustomComposite
Provides a custom composite element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);

  // Always to should multiple element settings since WebformComposite
  // extends WebformMultiple.
  unset($form['multiple']['#states']);
  return $form;
}