Pull merge.
[yaffs-website] / web / core / modules / system / tests / modules / deprecation_test / deprecation_test.module
1 <?php
2
3 /**
4  * @file
5  * Contains functions for testing calling deprecated functions in tests.
6  */
7
8 /**
9  * A deprecated function.
10  *
11  * @return string
12  *   A known return value of 'known_return_value'.
13  *
14  * @deprecated in Drupal 8.4.x. Might be removed before Drupal 9.0.0. This is
15  *   the deprecation message for deprecated_test_function().
16  */
17 function deprecation_test_function() {
18   @trigger_error('This is the deprecation message for deprecation_test_function().', E_USER_DEPRECATED);
19   return 'known_return_value';
20 }
21
22 /**
23  * Implements hook_deprecated_hook().
24  */
25 function deprecation_test_deprecated_hook($arg) {
26   return $arg;
27 }
28
29 /**
30  * Implements hook_deprecated_alter_alter().
31  */
32 function deprecation_test_deprecated_alter_alter(&$data, $context1, $context2) {
33   $data = [$context1, $context2];
34 }