function hook_webform_handler_invoke_METHOD_NAME_alter in Webform 8.5
Same name and namespace in other branches
- 6.x webform.api.php \hook_webform_handler_invoke_METHOD_NAME_alter()
Act on a webform handler when a specific method is invoked.
Allows module developers to implement custom logic that can executed before a specified webform handler method is invoked.
This hook can be used to…
- Conditionally enable or disable a handler.
- Alter a handler's configuration.
- Preprocess submission data being passed to a webform handler.
Parameters
\Drupal\webform\Plugin\WebformHandlerInterface $handler: A webform handler attached to a webform.
array $args: Argument being passed to the handler's method.
See also
\Drupal\webform\Plugin\WebformHandlerInterface
1 function implements hook_webform_handler_invoke_METHOD_NAME_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- webform_test_handler_invoke_alter_webform_handler_invoke_pre_create_alter in tests/
modules/ webform_test_handler_invoke_alter/ webform_test_handler_invoke_alter.module - Implements hook_webform_handler_invoke_METHOD_NAME_alter().
File
- ./
webform.api.php, line 468 - Hooks related to Webform module.
Code
function hook_webform_handler_invoke_METHOD_NAME_alter(\Drupal\webform\Plugin\WebformHandlerInterface $handler, array &$args) {
$webform = $handler
->getWebform();
$webform_submission = $handler
->getWebformSubmission();
$webform_id = $handler
->getWebform()
->id();
$handler_id = $handler
->getHandlerId();
$state = $webform_submission
->getState();
}