82363458715853750379b2c7ded95863ef80e843
[yaffs-website] / web / core / modules / hal / tests / modules / hal_test / hal_test.module
1 <?php
2
3 /**
4  * @file
5  * Contains hook implementations for testing HAL module.
6  */
7
8 /**
9  * Implements hook_hal_type_uri_alter().
10  */
11 function hal_test_hal_type_uri_alter(&$uri, $context = []) {
12   if (!empty($context['hal_test'])) {
13     $uri = 'hal_test_type';
14   }
15 }
16
17 /**
18  * Implements hook_hal_relation_uri_alter().
19  */
20 function hal_test_hal_relation_uri_alter(&$uri, $context = []) {
21   if (!empty($context['hal_test'])) {
22     $uri = 'hal_test_relation';
23   }
24 }
25
26 /**
27  * Implements hook_rest_type_uri_alter().
28  *
29  * @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetTypeUri().
30  *
31  * @see https://www.drupal.org/node/2830467
32  */
33 function hal_test_rest_type_uri_alter(&$uri, $context = []) {
34   if (!empty($context['rest_test'])) {
35     $uri = 'rest_test_type';
36   }
37 }
38
39 /**
40  * Implements hook_rest_relation_uri_alter().
41  *
42  * @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetRelationUri().
43  *
44  * @see https://www.drupal.org/node/2830467
45  */
46 function hal_test_rest_relation_uri_alter(&$uri, $context = []) {
47   if (!empty($context['rest_test'])) {
48     $uri = 'rest_test_relation';
49   }
50 }