hal_test.module
Same filename in other branches
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';
}
}
/**
* Implements hook_rest_type_uri_alter().
*
* @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetTypeUri().
*
* @see https://www.drupal.org/node/2830467
*/
function hal_test_rest_type_uri_alter(&$uri, $context = []) {
if (!empty($context['rest_test'])) {
$uri = 'rest_test_type';
}
}
/**
* Implements hook_rest_relation_uri_alter().
*
* @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetRelationUri().
*
* @see https://www.drupal.org/node/2830467
*/
function hal_test_rest_relation_uri_alter(&$uri, $context = []) {
if (!empty($context['rest_test'])) {
$uri = 'rest_test_relation';
}
}
Functions
Title | Deprecated | Summary |
---|---|---|
hal_test_hal_relation_uri_alter | Implements hook_hal_relation_uri_alter(). | |
hal_test_hal_type_uri_alter | Implements hook_hal_type_uri_alter(). | |
hal_test_rest_relation_uri_alter | Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetRelationUri(). |
Implements hook_rest_relation_uri_alter(). |
hal_test_rest_type_uri_alter | Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetTypeUri(). |
Implements hook_rest_type_uri_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.