You are here

protected function Webform::invokeHandlerAlter in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::invokeHandlerAlter()

Alter a webform handler when it is invoked.

Parameters

\Drupal\webform\Plugin\WebformHandlerInterface $handler: A webform handler.

string $method_name: The handler method to be invoked.

array $args: Array of arguments being passed to the handler's method.

See also

hook_webform_handler_invoke_alter()

hook_webform_handler_invoke_METHOD_NAME_alter()

1 call to Webform::invokeHandlerAlter()
Webform::invokeHandlers in src/Entity/Webform.php
Invoke a handlers method.

File

src/Entity/Webform.php, line 2784

Class

Webform
Defines the webform entity.

Namespace

Drupal\webform\Entity

Code

protected function invokeHandlerAlter(WebformHandlerInterface $handler, $method_name, array $args) {
  $method_name = WebformTextHelper::camelToSnake($method_name);
  \Drupal::moduleHandler()
    ->alter('webform_handler_invoke', $handler, $method_name, $args);
  \Drupal::moduleHandler()
    ->alter('webform_handler_invoke_' . $method_name, $handler, $args);
}