You are here

function webform_test_handler_invoke_alter_webform_handler_invoke_pre_create_alter in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/modules/webform_test_handler_invoke_alter/webform_test_handler_invoke_alter.module \webform_test_handler_invoke_alter_webform_handler_invoke_pre_create_alter()

Implements hook_webform_handler_invoke_METHOD_NAME_alter().

File

tests/modules/webform_test_handler_invoke_alter/webform_test_handler_invoke_alter.module, line 25
Support module for webform that provides handler invoke alter tests.

Code

function webform_test_handler_invoke_alter_webform_handler_invoke_pre_create_alter(WebformHandlerInterface $handler, array $args) {
  $t_args = [
    '@webform_id' => $handler
      ->getWebform()
      ->id(),
    '@handler_id' => $handler
      ->getHandlerId(),
  ];
  \Drupal::messenger()
    ->addStatus(t('Invoking hook_webform_handler_invoke_pre_create_alter() for "@webform_id:@handler_id"', $t_args), TRUE);
}