You are here

public function WebformCompositeBase::initializeCompositeElements in Webform 6.x

Same name in this branch
  1. 6.x src/Element/WebformCompositeBase.php \Drupal\webform\Element\WebformCompositeBase::initializeCompositeElements()
  2. 6.x src/Plugin/WebformElement/WebformCompositeBase.php \Drupal\webform\Plugin\WebformElement\WebformCompositeBase::initializeCompositeElements()
Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/WebformCompositeBase.php \Drupal\webform\Plugin\WebformElement\WebformCompositeBase::initializeCompositeElements()

Initialize and cache #webform_composite_elements.

Parameters

array $element: A composite element.

1 call to WebformCompositeBase::initializeCompositeElements()
WebformCompositeBase::initialize in src/Plugin/WebformElement/WebformCompositeBase.php
Initialize an element to be displayed, rendered, or exported.
2 methods override WebformCompositeBase::initializeCompositeElements()
Address::initializeCompositeElements in src/Plugin/WebformElement/Address.php
WebformCustomComposite::initializeCompositeElements in src/Plugin/WebformElement/WebformCustomComposite.php
Initialize and cache #webform_composite_elements.

File

src/Plugin/WebformElement/WebformCompositeBase.php, line 1272

Class

WebformCompositeBase
Provides a base for composite elements.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function initializeCompositeElements(array &$element) {

  /** @var \Drupal\webform\Element\WebformCompositeInterface $class */
  $class = $this
    ->getFormElementClassDefinition();
  $element['#webform_composite_elements'] = $class::initializeCompositeElements($element);
  $this
    ->initializeCompositeElementsRecursive($element, $element['#webform_composite_elements']);
}