public function TestWebformHandler::alterElement in Webform 8.5
Same name and namespace in other branches
- 6.x tests/modules/webform_test_handler/src/Plugin/WebformHandler/TestWebformHandler.php \Drupal\webform_test_handler\Plugin\WebformHandler\TestWebformHandler::alterElement()
Alter webform element.
Parameters
array $element: The webform element.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
array $context: An associative array containing the following key-value pairs:
- form: The form structure to which elements is being attached.
Overrides WebformHandlerBase::alterElement
See also
\Drupal\webform\WebformSubmissionForm::prepareElements()
File
- tests/
modules/ webform_test_handler/ src/ Plugin/ WebformHandler/ TestWebformHandler.php, line 67
Class
- TestWebformHandler
- Webform submission test handler.
Namespace
Drupal\webform_test_handler\Plugin\WebformHandlerCode
public function alterElement(array &$element, FormStateInterface $form_state, array $context) {
$this
->displayMessage(__FUNCTION__);
}