webform_test_message_custom.module in Webform 6.x
Same filename and directory in other branches
Support module for Webform module custom message testing.
File
tests/modules/webform_test_message_custom/webform_test_message_custom.moduleView source
<?php
/**
* @file
* Support module for Webform module custom message testing.
*/
/**
* Implements hook_webform_message_custom().
*/
function webform_test_message_custom_webform_message_custom($operation, $id) {
// Handle 'webform_test_message_custom' defined in
// webform.webform.test_element_message.yml.
if ($id === 'webform_test_message_custom') {
switch ($operation) {
case 'closed':
return \Drupal::state()
->get($id, FALSE);
case 'close':
\Drupal::state()
->set($id, TRUE);
return NULL;
case 'reset':
\Drupal::state()
->delete($id);
return NULL;
}
}
}
Functions
Name![]() |
Description |
---|---|
webform_test_message_custom_webform_message_custom | Implements hook_webform_message_custom(). |