Introduction of WebformCompositeFormElementTrait
includes a new pre render for class WebformCompositeBase
. New custom webform composite classes which require using a pre render method, should use the new method preRenderWebformCompositeFormElement
.
Existing webform composite classes which use the original pre render method preRenderCompositeFormElement
, may not function as expected and instead should convert to calling the new method.
Example from:
public static function preRenderCompositeFormElement($element) {
$element = parent::preRenderCompositeFormElement($element);
.
.
return $element;
}
Convert to:
public static function preRenderWebformCompositeFormElement($element) {
$element = parent::preRenderWebformCompositeFormElement($element);
.
.
return $element;
}
Where existing classes do not directly extend the WebformCompositeBase
, add the new trait using:
use Drupal\webform\Element\WebformCompositeFormElementTrait;