You are here

protected function ExampleWebformHandler::debug in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_example_handler/src/Plugin/WebformHandler/ExampleWebformHandler.php \Drupal\webform_example_handler\Plugin\WebformHandler\ExampleWebformHandler::debug()

Display the invoked plugin method to end user.

Parameters

string $method_name: The invoked method name.

string $context1: Additional parameter passed to the invoked method name.

20 calls to ExampleWebformHandler::debug()
ExampleWebformHandler::alterElements in modules/webform_example_handler/src/Plugin/WebformHandler/ExampleWebformHandler.php
Alter webform submission webform elements.
ExampleWebformHandler::alterForm in modules/webform_example_handler/src/Plugin/WebformHandler/ExampleWebformHandler.php
Alter webform submission form.
ExampleWebformHandler::confirmForm in modules/webform_example_handler/src/Plugin/WebformHandler/ExampleWebformHandler.php
Confirm webform submission form.
ExampleWebformHandler::createElement in modules/webform_example_handler/src/Plugin/WebformHandler/ExampleWebformHandler.php
Acts on a element after it has been created.
ExampleWebformHandler::createHandler in modules/webform_example_handler/src/Plugin/WebformHandler/ExampleWebformHandler.php
Acts on handler after it has been created and added to webform.

... See full list

File

modules/webform_example_handler/src/Plugin/WebformHandler/ExampleWebformHandler.php, line 249

Class

ExampleWebformHandler
Webform example handler.

Namespace

Drupal\webform_example_handler\Plugin\WebformHandler

Code

protected function debug($method_name, $context1 = NULL) {
  if (!empty($this->configuration['debug'])) {
    $t_args = [
      '@id' => $this
        ->getHandlerId(),
      '@class_name' => get_class($this),
      '@method_name' => $method_name,
      '@context1' => $context1,
    ];
    $this
      ->messenger()
      ->addWarning($this
      ->t('Invoked @id: @class_name:@method_name @context1', $t_args), TRUE);
  }
}