public function WebformHandlerBase::alterElement in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformHandlerBase.php \Drupal\webform\Plugin\WebformHandlerBase::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 WebformHandlerInterface::alterElement
See also
\Drupal\webform\WebformSubmissionForm::prepareElements()
2 methods override WebformHandlerBase::alterElement()
- OptionsLimitWebformHandler::alterElement in modules/
webform_options_limit/ src/ Plugin/ WebformHandler/ OptionsLimitWebformHandler.php - Alter webform element.
- TestWebformHandler::alterElement in tests/
modules/ webform_test_handler/ src/ Plugin/ WebformHandler/ TestWebformHandler.php - Alter webform element.
File
- src/
Plugin/ WebformHandlerBase.php, line 566
Class
- WebformHandlerBase
- Provides a base class for a webform handler.
Namespace
Drupal\webform\PluginCode
public function alterElement(array &$element, FormStateInterface $form_state, array $context) {
}