You are here

protected function WebformTestElement::displayMessage in Webform 8.5

Same name and namespace in other branches
  1. 6.x tests/modules/webform_test_element/src/Plugin/WebformElement/WebformTestElement.php \Drupal\webform_test_element\Plugin\WebformElement\WebformTestElement::displayMessage()

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.

12 calls to WebformTestElement::displayMessage()
WebformTestElement::formatHtml in tests/modules/webform_test_element/src/Plugin/WebformElement/WebformTestElement.php
Format an element's value as HTML.
WebformTestElement::formatText in tests/modules/webform_test_element/src/Plugin/WebformElement/WebformTestElement.php
Format an element's value as plain text.
WebformTestElement::postCreate in tests/modules/webform_test_element/src/Plugin/WebformElement/WebformTestElement.php
Acts on a webform submission element after it is created.
WebformTestElement::postDelete in tests/modules/webform_test_element/src/Plugin/WebformElement/WebformTestElement.php
Delete any additional value associated with an element.
WebformTestElement::postLoad in tests/modules/webform_test_element/src/Plugin/WebformElement/WebformTestElement.php
Acts on loaded webform submission.

... See full list

File

tests/modules/webform_test_element/src/Plugin/WebformElement/WebformTestElement.php, line 123

Class

WebformTestElement
Provides a 'webform_test_element' element.

Namespace

Drupal\webform_test_element\Plugin\WebformElement

Code

protected function displayMessage($method_name, $context1 = NULL) {
  if (PHP_SAPI !== 'cli') {
    $t_args = [
      '@class_name' => get_class($this),
      '@method_name' => $method_name,
      '@context1' => $context1,
    ];
    $this
      ->messenger()
      ->addStatus($this
      ->t('Invoked: @class_name:@method_name @context1', $t_args));
  }
}