You are here

hal_test.module in Drupal 9

Same filename and directory in other branches
  1. 8 core/modules/hal/tests/modules/hal_test/hal_test.module

Contains hook implementations for testing HAL module.

File

core/modules/hal/tests/modules/hal_test/hal_test.module
View source
<?php

/**
 * @file
 * Contains hook implementations for testing HAL module.
 */

/**
 * Implements hook_hal_type_uri_alter().
 */
function hal_test_hal_type_uri_alter(&$uri, $context = []) {
  if (!empty($context['hal_test'])) {
    $uri = 'hal_test_type';
  }
}

/**
 * Implements hook_hal_relation_uri_alter().
 */
function hal_test_hal_relation_uri_alter(&$uri, $context = []) {
  if (!empty($context['hal_test'])) {
    $uri = 'hal_test_relation';
  }
}