public function WebformExampleElement::prepare in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_example_element/src/Plugin/WebformElement/WebformExampleElement.php \Drupal\webform_example_element\Plugin\WebformElement\WebformExampleElement::prepare()
Prepare an element to be rendered within a webform.
Parameters
array $element: An element.
\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission. Webform submission is optional since it is not used by composite sub elements.
Overrides WebformElementBase::prepare
See also
\Drupal\webform\Element\WebformCompositeBase::processWebformComposite
File
- modules/
webform_example_element/ src/ Plugin/ WebformElement/ WebformExampleElement.php, line 49
Class
- WebformExampleElement
- Provides a 'webform_example_element' element.
Namespace
Drupal\webform_example_element\Plugin\WebformElementCode
public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
parent::prepare($element, $webform_submission);
// Here you can customize the webform element's properties.
// You can also customize the form/render element's properties via the
// FormElement.
//
// @see \Drupal\webform_example_element\Element\WebformExampleElement::processWebformElementExample
}